原生js实现线条视觉变幻动画效果代码

代码语言:html

所属分类:动画

代码描述:原生js实现线条视觉变幻动画效果代码

代码标签: 线条 视觉 变幻 动画 效果

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">

  
  
<style>
* {
  margin: 0;
  padding: 0;
}

html,
body {
  overflow: hidden;
}

body {
  position: relative;
  background-color: #000;
}
</style>



</head>

<body translate="no" >

  
  
      <script>
/*
* File Name / no name
* Created Date / Oct 16, 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(saturation, lightness) {
    return (
      "hsl(" +
      this.randomNumber(0, 360) +
      ", " +
      saturation +
     .........完整代码请登录后点击上方下载按钮下载查看

网友评论0