div+css实现百叶窗中水滴下落落下动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现百叶窗中一个大的水滴慢慢下落落下的动画效果代码

代码标签: css 水滴 落下 百叶窗

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">



    <style>
        *, *::before, *::after {
          padding: 0;
          margin: 0 auto;
          box-sizing: border-box;
        }
        
        body {
          background-color: #111;
          color: #fff;
          min-height: 100vh;
          display: grid;
          place-items: center;
        }
        
        .drop {
          position: relative;
          width: 420px;
          height: 420px;
          background-color: #def;
        }
        
        .line {
          position: absolute;
          width: 100%;
          height: 2px;
          background-color: #111;
        }
        .line:nth-child(1) {
          top: 4px;
          --delay: 0s;
        }
        .line:nth-child(2) {
          top: 14px;
          --delay: 0.156s;
        }
        .line:nth-child(3) {
          top: 24px;
          --delay: 0.312s;
        }
        .line:nth-child(4) {
          top: 34px;
          --delay: 0.468s;
        }
        .line:nth-child(5) {
          top: 44px;
          --delay: 0.624s;
        }
        .line:nth-child(6) {
          top: 54px;
          --delay: 0.78s;
        }
        .line:nth-child(7) {
          top: 64px;
          --delay: 0.936s;
        }
        .line:.........完整代码请登录后点击上方下载按钮下载查看

网友评论0