美文网首页
微信小程序自定义加载动画loading

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

作者: 好好学习__天天向上 | 来源:发表于2022-11-22 11:15 被阅读0次
<view class="ring">
  <view class="line">
  </view>
</view>

.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

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