微信小程序自定义加载动画loading
<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
网友评论