无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

數(shù)字雨html源碼

2023-07-06 18:23 作者:Morgo_  | 我要投稿

<!DOCTYPE html>


<html>


<head>


<meta charset="UTF-8">


<title>Code</title>


<style>


body{


margin: 0;


overflow: hidden;


}


</style>


</head>


<body>


<canvas id="myCanvas"></canvas>


<script>


const width = document.getElementById("myCanvas").width = screen.availWidth;


const height = document.getElementById("myCanvas").height = screen.availHeight;


const ctx = document.getElementById("myCanvas").getContext("2d");


const arr = Array(Math.ceil(width / 10)).fill(0);


const str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("");


function rain() {


ctx.fillStyle = "rgba(0,0,0,0.05)";


ctx.fillRect(0, 0, width, height);


ctx.fillStyle = "#0f0";


arr.forEach(function (value, index) {


ctx.fillText(str[Math.floor(Math.random() * str.length)], index * 10, value + 10);


arr[index] = value >= height || value > 8888 * Math.random() ? 0 : value + 10;


});


}


setInterval(rain, 30);


</script>


</body>


</html>


數(shù)字雨html源碼的評論 (共 條)

分享到微博請遵守國家法律
九江市| 蒙自县| 奉节县| 清苑县| 乌拉特中旗| 威信县| 唐山市| 阿城市| 河西区| 南通市| 枣强县| 陵水| 金乡县| 永州市| 龙川县| 中西区| 上饶市| 洞头县| 华阴市| 大余县| 绍兴县| 巴东县| 璧山县| 东平县| 双城市| 大化| 乌拉特前旗| 阳城县| 孟津县| 贵州省| 芦山县| 河东区| 石楼县| 恩平市| 阿拉善盟| 加查县| 泰兴市| 荔浦县| 保定市| 河南省| 瑞昌市|