CSS之anmiate属性使用

Document
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .wrap {
      /* visibility: hidden; */
      width: 100px;
      height: 100px;
      margin: 50px auto;
      background-color: rgba(137, 43, 226, 0.637);
      border-radius: 50%;
      animation: show .5s ease 2;
    }
    @keyframes show {
      0% {
        transform: translateX(0);
        box-shadow: 0px 0px 50px 20px #f10800;
        background-color: #f10800;
      }
      50% {
        transform: translateX(150px);
        box-shadow: 0px 0px 10px 20px #f702f7;
        background-color: #f702f7;
      }
      100% {
        transform: translateX(0px);
        box-shadow: 0px 0px 50px 20px #0bf561;
        background-color: #0bf561;
      }
    }
  </style>
</head>
<body>
  <div class="wrap">
    <!-- <div class="inner">hello</div> -->
  </div>
</body>
</html>
posted @ 2020-09-23 14:08  Barry东东和西西  阅读(164)  评论(0编辑  收藏  举报