js实现九宫格抽奖
本文实例为大家分享了js实现九宫格抽奖的具体代码,供大家参考,具体内容如下
一块钱
CSS:
#contaner{
width:606px;
height:606px;
border:1pxsolid#cccccc;
margin:40pxauto;
}
#contanerdiv{
width:200px;
height:200px;
background:#09f;
text-align:center;
color:#fff;
font-size:16px;
font-weight:bold;
line-height:200px;
float:left;
border:1pxsolid#cccccc;
}
#contaner#five{
transition:all0.5sease-in-out0s;
}
#contaner#five:hover{
cursor:pointer;
font-size:25px;
transform:scale(1.2)rotate(360deg);
background:#fff;
color:#09f;
}
.ys{
transform:scale(1.2);
box-shadow:000200pxredinset;
}
js:
window.onload=function(){
var$=function(id){
returndocument.getElementById(id);
}
varcontaner=$('contaner');
vardivs=contaner.getElementsByTagName('div');
varone=$('one');
vartwo=$('two');
varthree=$('three');
varfour=$('four');
varfive=$('five');
varsix=$('six');
varseven=$('seven');
vareight=$('eight');
varnight=$('night');
vark=0;
varflag=true;
five.onclick=function(){
if(flag){
varl=Math.ceil(Math.random()*10000);
clearInterval(time);
vartime=setInterval(function(){
for(vari=0;i
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持毛票票。
热门推荐
10 新人红包祝福语简短精辟
11 幼师给毕业祝福语简短
12 生日高考祝福语妹妹简短
13 下飞机祝福语简短英文
14 元宵发客户祝福语简短
15 爸妈金婚文案祝福语简短
16 新郎朋友红包祝福语简短
17 虎年五一祝福语大全简短
18 出阁宴祝福语姐姐简短
-
返回顶部
-
3162201930
-
czq8825@qq.com