亲宝软件园·资讯

展开

js代码雨效果

HAI6545 人气:0

<!DOCTYPE html>
<html lang="en">
 
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>代码雨demo</title>
</head>
<style>
  * {
    padding: 0px;
    margin: 0px;
  }
 
  body,
  html {
    width: 100%;
    height: 100%;
  }
 
  #libao {
    width: fit-content;
    height: 100%;
    display: flex;
    font-size: 10px;
    background: #000;
    word-wrap: break-word;
    word-break: break-all;
    overflow: hidden;
  }
 
  span {
    min-width: 15px;
    /* 栅栏格最小宽度 */
    font-size: 10px;
    color: #58bc5b;
    position: relative;
  }
 
  p {
    width: 100%;
    position: absolute;
    text-align: center;
  }
 
  .color6 {
    color: #58bc5b;
  }
 
  .color5 {
    color: #58bc5bd6;
  }
 
  .color4 {
    color: #58bc5ba8;
  }
 
  .color3 {
    color: #58bc5b60;
  }
 
  .color2 {
    color: #58bc5b28;
  }
 
  .color1 {
    color: #58bc5b10;
  }
</style>
 
<body>
  <div id="libao">
  </div>
  
</body>
 
</html>

效果:

加载全部内容

相关教程
猜你喜欢
用户评论