一款小清新界面风格html5 2048网页游戏代码,通过键盘wsad键和上下左右键来进行游戏,有4种游戏模式选择,3X3、4X4、5X5、6X6。
js代码
<script type="text/javascript" src="js/quietflow.min.js"></script>
<script type="text/javascript" src="js/frame.js"></script>
<script>
$(function() {
// body...
function unScroll() {
var top = $(document).scrollTop();
$(document).on('scroll.unable',function (e) {
$(document).scrollTop(top);
})
}
unScroll();
var random = Math.floor(Math.random() * (7 - 0 + 1) + 0);
console.log(random);
switch (random) {
case 0:
bouncingBalls();
break;
case 1:
starfield();
break;
case 2:
vortex();
break;
case 3:
shootingLines();
break;
default:
simpleGradient();
break;
}
function bouncingBalls(argument) {
$("body").quietflow({
theme: "bouncingBalls",
specificColors: [
"rgba(255, 10, 50, .5)",
"rgba(10, 255, 50, .5)",
"rgba(10, 50, 255, .5)",
"rgba(0, 0, 0, .5)"
]
})
}
function simpleGradient(argument) {
$("body").quietflow({
theme: "simpleGradient",
primary: "#B066FE",
accent: "#63E2FF"
})
}
function starfield() {
$("body").quietflow({
theme: "starfield"
})
}
function vortex() {
$("body").quietflow({
theme: "vortex",
miniRadii: 40
})
}
function shootingLines() {
$("body").quietflow({
theme: "shootingLines",
backgroundCol: "#141C26",
lineColor: "#05E0E0",
lineGlow: "#00ff00"
})
}
})
</script>
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791