简单的CSS圆形缩放动画

话不多说鼠标移动上去,看效果吧,效果预览

代码如下:

<!DOCTYPE html>
<html>
  <head>
    <title>css圆形缩放动画</title>
    <style>
      .circular {
        position: relative;
        width: 48px;
        height: 48px;
      }
      .circular i {
        position: absolute;
        top: 0;
        left: 0;
        width: 48px;
        height: 48px;
      }
      .circular i:before {
        content: '';
        border-radius: 50%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #20a839;
      }
      .circular i:after {
        content: '';
        transition: all .3s;
        border-radius: 50%;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: scale(0);
        background-color: #30cc54;
      }
      .circular:hover i:after {
        transform: scale(1);
      }
    </style>
  </head>
  <body>
    <div class="circular">
      <i></i>
    </div>
  </body>
</html>

相关文章:

  • 2022-12-23
  • 2021-11-11
  • 2021-09-12
  • 2022-12-23
  • 2021-08-29
  • 2021-12-03
  • 2022-01-04
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-05
  • 2022-12-23
  • 2021-06-24
  • 2021-11-17
  • 2021-05-29
  • 2022-12-23
相关资源
相似解决方案