爱滴魔力转圈圈

目录

  1. 创建背景图片,加圆角
  2. 添加动画效果

创建背景图片,加圆角

<div class="avatar"></div>
    .avatar {
      width: 200px;
      height: 200px;
      border-radius: 50%;  
      background-image: url("./1.jpg");
      background-size: cover;
      background-repeat: no-repeat;      
    }

添加动画

    .avatar:hover {
      transform: rotate(10turn);
      transition: all 2s cubic-bezier(.34,0,.84,1) 0.1s;
    }

猜你喜欢

转载自www.cnblogs.com/rosendolu/p/10884752.html
0条评论
添加一条新回复