本文实例为大家分享了js实现幸运抽奖九宫格大转盘效果,供大家参考,具体内容如下

基于javascript实现九宫格大转盘效果

实现代码:

<!DOCTYPE html>
<html>
<head>
 <meta charset="utf-8">
 <title>九宫格大转盘</title>
 <style type="text/css">
/*reset*/
*{ padding:0; margin:0}
body{ height: 100%; width: 100%; font-size:12px; color:#333;}
ul{ list-style:none;}
/*demo*/
#lottery{width:400px;height:400px;margin:20px auto 0; position:relative;}
#lottery div{width:100px;height:100px;text-align:centerfont-size:24px;color:#333; float:left;}
#lottery .cent{ background:#C33;}
#lottery .lottery-unit-0{ background:#CC6;}
#lottery .lottery-unit-1{ background:#F99;}
#lottery .lottery-unit-2{ background:#CC6;}
#lottery .lottery-unit-3{ background:#F99;}
#lottery .lottery-unit-4{ background:#CC6;}
#lottery .lottery-unit-5{ background:#F99;}
#lottery .lottery-unit-6{ background:#CC6;}
#lottery .lottery-unit-7{ background:#F99;}
#lottery .lottery-unit-8{ background:#CC6;}
#lottery .lottery-unit-9{ background:#F99;}
#lottery .lottery-unit-10{ background:#CC6;}
#lottery .lottery-unit-11{ background:#F99;}

#lottery div.select{background:#F0F;}

#lottery .start{ position:absolute; left:100px; top:100px; height:200px; width:200px;background:#C33; font-size:30px; text-align:center; cursor:pointer; line-height:200px; color:#fff;}
</style>
</style>
</head>
<body> 
 <!--九宫格大转盘-->
 <div id="lottery">
 
 <div class="lottery-unit lottery-unit-0">1</div>
 <div class="lottery-unit lottery-unit-1">2</div>
 <div class="lottery-unit lottery-unit-2">3</div>
 <div class="lottery-unit lottery-unit-3">4</div>
 
 <div class="lottery-unit lottery-unit-11">12</div>  
 <div class="cent"></div>
 <div class="cent"></div>  
 <div class="lottery-unit lottery-unit-4">5</div>
 
 <div class="lottery-unit lottery-unit-10">11</div>  
 <div class="cent"></div>
 <div class="cent"></div>  
 <div class="lottery-unit lottery-unit-5">6</div>
 
 <div class="lottery-unit lottery-unit-9">10</div>
 <div class="lottery-unit lottery-unit-8">9</div>
 <div class="lottery-unit lottery-unit-7">8</div>
 <div class="lottery-unit lottery-unit-6">7</div>

 <div class="start" id="start">抽奖</div>
 </div>
</body>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery.min.js">

以上就是本文的全部内容,希望对大家学习javascript程序设计有所帮助。

标签:
js九宫格大转盘,js大转盘,js九宫格

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
评论“基于javascript实现九宫格大转盘效果”
暂无“基于javascript实现九宫格大转盘效果”评论...