微信小程序自定义加载动画loading


  
  


.ring {
  position: relative;
  margin: 80rpx auto;
  width: 20px;
  height: 20px;
  border: 5px solid #3370ff;
  border-radius: 50%;
}

.line {
  display: block;
  position: absolute;
  z-index: 99;
  top: -25px;
  left: -25px;
  width: 60px;
  height: 60px;
}

.line::before {
  content: '';
  display: block;
  position: absolute;
  z-index: 99;
  top: 0px;
  left: 23.5px;
  width: 14px;
  height: 60px;
  border: 5px solid transparent;
  border-top: 5px solid #3370ff;
  border-radius: 10px;
  animation: animateCircle 0.6s linear infinite;
}

@keyframes animateCircle {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

效果图
转动的截图.png

你可能感兴趣的:(微信小程序自定义加载动画loading)