JavaScript/canvas/彩色线条:修订间差异
来自康健生活
< JavaScript | canvas
| 第2行: | 第2行: | ||
== eq 1 == | == eq 1 == | ||
{{codepen | {{codepen | ||
| | |id=uuid | ||
< | |height=400 | ||
html, | |html=<!DOCTYPE html> | ||
<html lang="en" > | |||
<head> | |||
<meta charset="UTF-8"> | |||
<title>CodePen - Imagination</title> | |||
<link rel="stylesheet" href="./style.css"> | |||
</head> | |||
<body> | |||
<!-- partial:index.partial.html --> | |||
<canvas></canvas></body></html> | |||
|style=html, | |||
body { | body { | ||
width: 100%; | width: 100%; | ||
| 第25行: | 第36行: | ||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
|script=// Imagination by @neave | |||
// Imagination by @neave | |||
window.requestAnimationFrame = | window.requestAnimationFrame = | ||
| 第206行: | 第215行: | ||
on('DOMContentLoaded', init); | on('DOMContentLoaded', init); | ||
}} | }} | ||
2025年4月30日 (三) 11:44的版本
test
eq 1
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<title>CodePen - Imagination</title>
<link rel="stylesheet" href="./style.css">
</head>
<body>
<!-- partial:index.partial.html -->
<canvas></canvas></body>
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
}
body {
margin: 0;
padding: 0;
color: #fff;
background-color: #000;
}
canvas {
-webkit-tap-highlight-color: transparent;
tap-highlight-color: transparent;
-webkit-user-select: none;
user-select: none;
cursor: pointer;
}
// Imagination by @neave
window.requestAnimationFrame =
window.requestAnimationFrame
No categories