微信小程序–加载动画:旋转方块

效果展示

技术分享图片

Demo代码

wxml

 <view>
        <view>
            <view ></view>
            <view ></view>
            <view ></view>
            <view ></view>
        </view>
    </view> 

wxss

page{
  margin: 0;
  padding: 0;
}

.loading-screen{
  width: 100%;
  height: 100vh;
  background-color: #2e2e2e;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading{
  width: 80px;
  display: flex;
  flex-wrap: wrap;
.
.
.
完整代码获取见文章末尾

效果展示(改进)

技术分享图片

Demo代码

wxml

  <view>
        <view>
            <view ></view>
            <view ></view>
            <view ></view>
            <view ></view>
        </view>
    </view>

wxss

page{
  margin: 0;
  padding: 0;
}

.loading-screen{
  width: 100%;
  height: 100vh;
  background-color: #2e2e2e;
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading{
  width: 80px;
  display: flex;
  flex-wrap: wrap;
  animation: rotate 4s linear infinite;
}

@keyframes rotate{
  to{
      transform: rotate(360deg);
  }
}



/* 四色版本 */
.loading .flour_1{
  width: 32px;
  height: 32px;
  background-color: #eb4d4b;
  margin: 4px;
.
.
.
完整源码获取途径
见文末引言

微信小程序--加载动画:旋转方块

以上是微信小程序–加载动画:旋转方块的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>