粒子流流动动画效果
代码语言:html
所属分类:动画
代码描述:粒子流流动动画效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Rajdhani:wght@500&display=swap");
* {
margin: 0;
padding: 0;
}
html,
body {
font-family: "Rajdhani", sans-serif;
overflow: hidden;
}
body {
position: relative;
background: #000;
}
main {
z-index: 2;
color: #fff;
position: fixed;
top: 50%;
left: 1.6rem;
transform: translateY(-50%);
}
h1 {
font-size: 2.4rem;
}
h1 > span {
font-size: 1.6rem;
}
p.checkbox {
color: #fff;
font-size: 1.6rem;
}
input[type="checkbox"] {
height: 1rem;
width: 1rem;
}
p {
padding: 0.8rem 0 0 0;
}
</style>
</head>
<body translate="no" >
<main>
<h1>Digital Stream</h1>
<p>Please moving the mouse or scroll.</p>
<p class="checkbox"><input id="checkbox" type="checkbox"><label for="checkbox"> Crack?</label></p>
</main>
<script src='https://cdnjs.cloudflare.com/ajax/libs/simplex-noise/2.4.0/simplex-noise.min.js'></script>
<script>
/*
* File Name / digitalStream.js
* Created Date / Sep 07, 2020
* Aurhor / Toshiya Marukubo
* Twitter / https://twitter.com/toshiyamarukubo
*/
/*
Common Tool.
*/
class Tool {
// random number.
static randomNumber(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
// random color rgb.
static randomColorRGB() {
return (
"rgb(" +
this.randomNumber(0, 255) +
", " +
this.randomNumber(0, 255) +
", " +
this.randomNumber(0, 255) +
")");
}
// random color hsl.
static randomColorHSL(hue, saturation, lightness) {
return (
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0