美文网首页
css动画--动画加载

css动画--动画加载

作者: 怪兽别跑biubiubi | 来源:发表于2018-03-23 15:15 被阅读0次
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>动画加载</title>
  <style>
      @keyframes box {
        from {
          opacity: 1;
          transform: translateY(0);
        }
        to {
          opacity: 0.1;
          transform: translateY(10px);
        }
      }
      .box {
        display: flex;
        justify-content: center;
      }
      .box>div {
        width: 1rem;
        height: 1rem;
        margin: 3rem 0.2rem;
        background: #8385aa;
        border-radius: 50%;
        animation: box 0.6s infinite alternate;
      }
      .box>div:nth-child(2) {
        animation-delay: 0.2s;
      }
      .box> div:nth-child(3) {
        animation-delay: 0.4s;
      }
  </style>
</head>
<body>
  <div class="box">
    <div></div>
    <div></div>
    <div></div>
  </div>
</body>
</html>

相关文章

网友评论

      本文标题:css动画--动画加载

      本文链接:https://www.haomeiwen.com/subject/lbrxcftx.html