本文实例为大家分享了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实现九宫格大转盘效果”评论...

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。