前端JS特效第47波:基于Zepto+CSS3宝箱开启动画抽奖JS特效代码

基于Zepto+CSS3宝箱开启动画抽奖JS特效代码,先来看看效果:

部分核心的代码如下:

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<!-- <link rel="stylesheet" href="http://imgcache.gtimg.cn/vipstyle/mobile/global/mqqui/v1/css/global.css"> -->
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/atom.css">
<link rel="stylesheet" href="css/global.css">
<link rel="stylesheet" href="css/open.css">
<title>基于Zepto+CSS3宝箱开启动画抽奖JS特效代码</title>
</head>
<body ontouchstart="" class="open-body">
  <div class="wrapper">
    
    <div class="bg rotate"></div>
    <div class="open-has ">
      <h3 class="title-close"><span class="user">德水</span>给你发了一个宝箱</h3>
      <!-- <h3 class="title-open">恭喜你,成功领取<span class="user">德水</span>发的宝箱</h3> -->
      <h3 class="title-open">恭喜你,</br>成功领取<span class="user">一二三四五六</span>发的全民飞机大战宝箱</h3>

      <div class="mod-chest">
        
        <div class="chest-close show ">
          <div class="gift"></div>
          <div class="tips">
            <i class="arrow"></i>
          </div>
        </div>
        <div class="chest-open ">
          <div class="mod-chest-cont open-cont">
            <div class="content">
              <div class="gift">
                <div class="icon"><img src="img/chest-icon-zuan.png"></div> x 500 
              </div>
              <div class="func">
                <button class="chest-btn">查看详情并提取</button>
              </div>
            </div>
          </div>
        </div>
        
      </div>
    </div>
    <div class="open-none" style="display:none">
      <h3>你来晚啦,下次早点吧!</h3>
      <div class="mod-chest">
        <div class="chest-open show"></div>
      </div>
      <div class="func">
        <button class="chest-btn">查看领取详情</button>
      </div>
    </div>
    <div class="chest-notice">
      <input type="checkbox" id="notice-checkbox">
      <label for="notice-checkbox">关注PHP中文网</label>
    </div>
  </div>
  <script type="text/javascript" src="js/zepto.min.js"></script>
<script type="text/javascript">

  $(".chest-close").click(function(){

    $(this).addClass("shake");
    var that=this;
    
    this.addEventListener("webkitAnimationEnd", function(){
      
      $(that).closest(".open-has").addClass("opened");
      setTimeout(function(){
        $(that).removeClass("show");
        $(that).closest(".mod-chest").find(".chest-open").addClass("show");
        setTimeout(function(){
          $(".chest-open").addClass("blur");
        },500)
      },200)
    }, false);
  })
</script>
</body>
</html>
<div style="display:none">
	<script type="text/javascript">
	var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
	document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F6f798e51a1cd93937ee8293eece39b1a' type='text/javascript'%3E%3C/script%3E"));
	</script>
	<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_5718743'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s9.cnzz.com/stat.php%3Fid%3D5718743%26show%3Dpic2' type='text/javascript'%3E%3C/script%3E"));</script>
	</div>
  

全部代码:基于Zepto+CSS3宝箱开启动画抽奖JS特效代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值