美文网首页
css动画loading效果

css动画loading效果

作者: 不知道的是 | 来源:发表于2019-04-15 08:10 被阅读0次
css3-animation-spin.gif
<!DOCTYPE html>
<html>

<head>
  <style>
    div {
      width: 100px;
      height: 100px;
      background: red;
      border-radius: 50%;
      position: relative;
    }

    div.animation {
      border: 4px dotted green;
      animation: turn-around .5s linear infinite;
    }

    @keyframes turn-around {
      from {
        transform: rotateZ(0deg);
      }
      to {
        transform: rotateZ(360deg);
      }
    }
  </style>
</head>

<body>

  <p><strong>注释:</strong>Internet Explorer 9 以及更早的版本不支持 animation 属性。</p>

  <div></div>
  <div class="animation"></div>

</body>

</html>

Codepen:

https://codepen.io/MonguDykrai/pen/VNMwEY

相关文章

网友评论

      本文标题:css动画loading效果

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