炫酷HTML5网页背景基于Canvas绘制
function resized() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
({ width, height } = canvas);
width_half = width * 0.5;
height_half = height * 0.5;
canvasHypot = Math.hypot(width_half, height_half);
ctx.beginPath();
ctx.fillStyle = ‘hsl(0, 0%, 0%)‘;
ctx.fillRect(0, 0, width, height);
}
预览地址:http://www.jquery66.com/demos/css3/css20194103/index.html
下载地址:https://u18725144.ctfile.com/fs/18725144-357933519
原文地址:https://blog.51cto.com/14168515/2372433
时间: 2024-11-08 23:10:04