jquery实现年会大屏三维抽奖效果代码
代码语言:html
所属分类:其他
代码描述:jquery实现年会大屏三维抽奖效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> * { padding: 0; margin: 0; } html,body{ width:100%; min-height:100%; } body { background: url(//repo.bfw.wiki/bfwrepo/image/5eaa0f4300406.png) no-repeat; background-size: 100% 100%; -webkit-background-size: 100% 100%; font-family: "宋体"; } .clearfix:after{ clear:both; display: table; content: ''; } .left{ float:left; } .right{ float:right } .container { position: absolute; -webkit-transform: perspective(1000px); -moz-transform: perspective(1000px); -ms-transform: perspective(1000px); -o-transform: perspective(1000px); transform: perspective(1000px); -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; transform-style: preserve-3d; -webkit-transform-origin: center center; -moz-transform-origin: center center ; -ms-transform-origin: center center ; -o-transform-origin: center center ; transform-origin: center center ; width: 60%; height: 60%; left: 20%; top: 20%; } .element, .js_current_dom { -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -ms-background-size: 100% 100%; -o-background-size: 100% 100%; background-size: 100% 100%; background-color: #fff; } .btn_circle { height: 100px; width: 100px; border:20px solid #eee; line-height: 100px; font-size: 24px; text-align: center; border-radius: 50%; background-color: #f00; cursor: pointer; position: absolute; right: 50px; bottom: 50px; z-index: 9; color:#fff; -webkit-transition:all 0.7s linear; -moz-transition:all 0.7s linear; -ms-transition:all 0.7s linear; -o-transition:all 0.7s linear; transition:all 0.7s linear; } .btn_circle:hover{ background-color: darkorange; border-color: #fff; } .btn_start{ position: static; margin:25px auto 0 auto; } .mask { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: none; z-index: 999; } .lucky_icon { height: 70%; width: 70%; border-radius: 50%; margin-left:15%; } .lucky_userInfo{ position: absolute; height:100px; width:100px; color:#fff; font-size: 24px; } .lucky_list{ width:760px; height:560px; padding:20px; position: relative; margin:0 auto; background-color: rgba(255, 255, 255, 0.2); -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; } .lpl_userInfo{ width:84px; height:100px; text-align: center; float: left; margin-bottom:10px; } .lpl_userImage{ width:60px; height:60px; -webkit-border-radius: 50%; -moz-border-radius: 50%; border-radius: 50%; } .lpl_userName{ margin-top:12px; display: block; overflow: hidden; text-overflow:ellipsis; white-space: nowrap; font-size: 16px; color:#fff; } .lucky_userName{ text-align: center; margin-top:12px; display: block; overflow: hidden; text-overflow:ellipsis; white-space: nowrap; } .lucky_title{ text-align: center; width:100%; font-size:30px; font-weight: bold; color:darkorange; height:150px; line-height: 150px; } .lucky_prize{ width:280px; } .lucky_people_list{ width:440px; } .flex{ display: flex; flex-direction: row; } .lucky_prize_box{ height:200px; display: flex; flex-direction: row; } .lucky_prize_direction{ width:70px; height:100%; background-color: transparent; border:none; color:#fff; font-size: 60px; text-align: center; } .lucky_prize_direction.active{ color:#f22; } button:focus{ outline: none; } .lucky_prize_picture{ width:160px; display: flex; justify-content: center; align-items: center; } .lucky_prize_show{ max-width: 100%; max-height:100%; } .lucky_people_title{ width:100%; height:60px; background-color: #f22; font-size: 24px; color:#fff; text-align: center; line-height: 60px; font-weight: bold; } .lucky_setting{ height:50px; background-color: #f22; font-size: 16px; color:#fff; text-align: left; line-height: 50px; padding:0 10px; font-weight: bold; margin-top:25px; } .select_box{ float: right; margin-top:1px; } .select_lucky_number{ font-size: 22px; border:1px solid #eee; outline: none; } .lucky_number{ font-size: 24px; } .lucky_prize_title{ height:50px; background-color: #f22; color:#fff; text-align: center; line-height: 50px; font-weight: bold; margin-top:25px; } .lpl_list{ margin-top:20px; height:480px; overflow: auto; box-sizing: border-box; } .loader_file{ position: absolute; left:0; top:0; width:100%; height:100%; background-color: rgba(0, 0, 0, .6); z-index:999999; display: flex; align-items: center; justify-content: center; color:#fff; font-size: 30px; } .none { display: none; } </style> </head> <body> <div class="container none"></div> <div class="mask"></div> <div id="stop" class="btn_circle none">停止</div> <div class="lucky_title">2018年***年会抽奖活动</div> <div class="loader_file"> 用户数据导入中 <span class="current_number"></span><span class="all_number"></span> </div> <div class="lucky_list clearfix"> <div class="left lucky_prize"> <div class="lucky_prize_box"> <button class="lucky_prize_left lucky_prize_direction"><</button> <div data-default="1" class="lucky_prize_picture"> <img class="lucky_prize_show none" src="//repo.bfw.wiki/bfwrepo/image/60bf1ce19319c.png" alt="一等奖笔记本"/> <img class="none lucky_prize_show" src="//repo.bfw.wiki/bfwrepo/image/60d2ce3f0b4a4.png" alt="二等奖平衡车"/> <img class="none lucky_prize_show" src="//repo.bfw.wiki/bfwrepo/image/60bf1caec478a.png" alt="三等奖现金红包"/> </div> <button class="lucky_prize_right active lucky_prize_direction">></button> </div> <div class="lucky_prize_title">一等奖笔记本</div> <div class="lucky_setting"> <span> <b class="lucky_number">998</b> 人参与 </span> <div class="select_box"> 一次抽 <select name="select_lucky_number" class='select_lucky_number'> <option selected = "selected" value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="10">10</option> <option value="20">20</option> <option value="30">30</option> </select> 人 </div> </div> <div id="open" class="btn_circle btn_start">开始</div> </div> <div class="right lucky_people_list"> <div class="lucky_people_title">中奖名单</div> <div class="lpl_list clearfix none"> <!--<div class="lpl_userInfo">--> <!--<img class="lpl_userImage" src="http://wx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTK9YW8jiaJuo8xHZohXgpMpzVCWleDx4ko9zLn5B8iavAR2yQpeLMR5BQjf2jicwcGURXq5xf4yguwIQ/132"--> <!--alt=""/>--> <!--<p class="lpl_userName">小木姐姐</p>--> <!--</div>--> </div> <div class="lpl_list clearfix none"> </div> <div class="lpl_list clearfix none"> </div> </div> </div> <script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script> <script type="text/javascript"> /* transformjs 1.1.6 * By dntzhang * Github: https://github.com/AlloyTeam/AlloyTouch/tree/master/transformjs */ ; (function () { var DEG_TO_RAD = 0.017453292519943295; var Matrix3D = function (n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) { this.elements = window.Float32Array ? new Float32Array(16) : []; var te = this.elements; te[0] = (n11 !== undefined) ? n11 : 1; te[4] = n12 || 0; te[8] = n13 || 0; te[12] = n14 || 0; te[1] = n21 || 0; te[5] = (n22 !== undefined) ? n22 : 1; te[9] = n23 || 0; te[13] = n24 || 0; te[2] = n31 || 0; te[6] = n32 || 0; te[10] = (n33 !== undefined) ? n33 : 1; te[14] = n34 || 0; te[3] = n41 || 0; te[7] = n42 || 0; te[11] = n43 || 0; te[15] = (n44 !== undefined) ? n44 : 1; }; Matrix3D.prototype = { set: function (n11, n12, n13, n14, n21, n22, n23, n24, n31, n32, n33, n34, n41, n42, n43, n44) { var .........完整代码请登录后点击上方下载按钮下载查看
网友评论0