一个装逼的单页

  • 内容
  • 相关

360截图20181107003449298.jpg

代码如下:

<!doctype html>
<html lang="en">
	<head><!--头部-->
		<meta charset="UTF-8">
		<meta name="Keywords" content="关键词">
		<meta name="Description" content="描述">
		<title>Document</title>
		<style>
		*{margin:0px;padding:0px;}
		body{overflow:hidden;}
		
		</style>
	</head>
	<body><!--身体-->
		<canvas id="canvas">
			您的浏览器不支持canvas标签,请您更换浏览器!!!
		</canvas>
		<script>
			var canvas = document.getElementById("canvas");
			var can = canvas.getContext("2d");
			var s = window.screen;
			var w = canvas.width = s.width;
			var h = canvas.height = s.height;
			
			var words = Array(256).join("1").split("");
			function draw(){
				can.fillStyle = "rgba(0,0,0,0.05)";
				can.fillRect(0,0,w,h);
				can.fillStyle = color2();
				words.map(function(y,n){
					text = String.fromCharCode(65+Math.ceil(Math.random()*57));
					x = n*10;
					can.fillText(text,x,y);
					words[n] = (y > 758 + Math.random()*484) ? 0 : y+10;
				});
			}
			setInterval(draw,10);
			function color1(){
				var colors = [0,1,2,3,4,5,6,7,8,9,"a","b","c","d","e","f"];
				var color = "";
				for(var i=0;i<6;i++){
					var n = Math.ceil(Math.random()*15);
					color += ""+colors[n];
					//console.log(color);
					if(i==5){
						return "#"+color;
					}
				}
			}
			function color2(){
				var color = Math.ceil(Math.random()*16777215).toString(16);
				while(color.length<6){
					color += "0"+color;
				}
				return "#"+color;
			}
			function color3(){
				return "#"+(function(color){
					return new Array(7-color.length).join("0")+color
				})((Math.random() * 0x1000000 << 0).toString(16))
			}

		</script>
	</body>
</html>

 

标签:

标题:一个装逼的单页

版权:转载请带上版权原创为《陌路

侵权:本站资源来自互联网侵权联系删除

链接:https://av.ci/101.html

一个装逼的单页

发表评论

电子邮件地址不会被公开。 必填项已用*标注

00:00 / 00:00
顺序播放