1 Star 0 Fork 0

NJU-TJL/NJUTianJian.github.io

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
draw_lots.html 2.88 KB
一键复制 编辑 原始数据 按行查看 历史
zsnjuts 提交于 2018-09-06 14:28 . 添加了抽奖页面
<html>
<head>
<meta charset="utf-8">
<title>抽奖</title>
<link rel="shortcut icon" href="img/logo.ico"/>
<link rel="bookmark" href="img/logo.ico"/>
</head>
<body>
<script type="text/javascript">
var avg = [];
for(var i=1;i<=250;i++){
avg.push(i);
}
//var vip = [1, 2, 3];
var tst = avg;
/*for(var i=0;i<3;i++){
tst = tst.concat(vip);
}*/
var ctrl;
function gameStart(){
ctrl = setInterval(function(){myTimer()},50);
}
function myTimer(){
document.getElementById("demo").innerHTML = tst[parseInt(Math.random()*tst.length)];
}
function gameStop(){
clearInterval(ctrl);
}
</script>
<br><br><br>
<h1 id="demo" style="text-align:center;font-size:50px;">Ready?</h1>
<p style="text-align:center">
<a onclick="gameStart()" class="a_demo_two" href="#">
Start
</a>
&ensp;&ensp;&ensp;&ensp;
<a onclick="gameStop()" class="a_demo_two" href="#">
Stop
</a>
<p>
</body>
<style>
.a_demo_two {
background-color:#3bb3e0;
padding:10px;
position:relative;
font-family: 'Open Sans', sans-serif;
font-size:12px;
text-decoration:none;
color:#fff;
background-image: linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -o-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -moz-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -ms-linear-gradient(bottom, rgb(44,160,202) 0%, rgb(62,184,229) 100%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0, rgb(44,160,202)),
color-stop(1, rgb(62,184,229))
);
-webkit-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785;
-moz-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785;
-o-box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785;
box-shadow: inset 0px 1px 0px #7fd2f1, 0px 6px 0px #156785;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px;
}
.a_demo_two::before {
background-color:#072239;
content:"";
display:block;
position:absolute;
width:100%;
height:100%;
padding-left:2px;
padding-right:2px;
padding-bottom:4px;
left:-2px;
top:5px;
z-index:-1;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0px 1px 0px #fff;
-moz-box-shadow: 0px 1px 0px #fff;
-o-box-shadow: 0px 1px 0px #fff;
box-shadow: 0px 1px 0px #fff;
}
.a_demo_two:active {
color:#156785;
text-shadow: 0px 1px 1px rgba(255,255,255,0.3);
background:rgb(44,160,202);
-webkit-box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785;
-moz-box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785;
-o-box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785;
box-shadow: inset 0px 1px 0px #7fd2f1, inset 0px -1px 0px #156785;
top:7px;
}
.a_demo_two:active::before {
top:-2px;
}
</style>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/NJU-TJL/NJUTianJian.github.io.git
git@gitee.com:NJU-TJL/NJUTianJian.github.io.git
NJU-TJL
NJUTianJian.github.io
NJUTianJian.github.io
master

搜索帮助