限时免费试用:欢迎注册 api.bigmodel.org ,快速体验大模型 API 接入服务。
当前位置:首页 >开发者 >网站框架 >小程序

小程序实例 | 加载样式

分类:小程序时间:2018-12-22浏览:2419
index.wxml

  
    
      
      
      
      
      
      
      
      
    
  
  


index.wxss
.circle-line{
    width: 100px;
    height: 100px;
    display: inline-block;
    position: relative;
}
.circle-line text{
    display: block;
    width: 50%;
    height: 5px;
    opacity: .7;
    position: absolute;
    top: calc(50% - 2.5px);
    left: 0px;
    transform-origin: center right; 
    animation: circle 1.5s linear infinite; 
}
.circle-line text::before{
    content: '';
    display: block;
    width: 15px;
    height: 5px;
    position: absolute;
    top: 0;
    right: 10px;
    background-color: blue;
}
.circle-line text:nth-child(1){
    transform: rotate(0deg);
    animation-delay: 0.2s;
}
.circle-line text:nth-child(2){
    transform: rotate(45deg);
    animation-delay: 0.4s;
}
.circle-line text:nth-child(3){
    transform: rotate(90deg);
    animation-delay: 0.6s;
}
.circle-line text:nth-child(4){
    transform: rotate(135deg);
    animation-delay: 0.8s;
}
.circle-line text:nth-child(5){
    transform: rotate(180deg);
    animation-delay: 1s;
}
.circle-line text:nth-child(6){
    transform: rotate(225deg);
    animation-delay: 1.2s;
}
.circle-line text:nth-child(7){
    transform: rotate(270deg);
    animation-delay: 1.4s;
}
.circle-line text:nth-child(8){
    transform: rotate(315deg);
    animation-delay: 1.6s;
}
@keyframes circle {
    0%{
        opacity: 0.05;
    }
    100%{
        opacity: 0.9;
    }
}
本站文章如未注明出处均为原创,转载请注明出处,如有侵权请邮件联系站长。
0/500
Share your thoughts respectfully.