日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

微信小程序align_微信小程序四色花瓣

發布時間:2025/4/5 编程问答 18 豆豆
生活随笔 收集整理的這篇文章主要介紹了 微信小程序align_微信小程序四色花瓣 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

效果展示

Demo代碼

wxml

????<view?class="loading-screen">
????????<view?class="loading">
????????????<view?class="a?flour"?>view>
????????????<view?class="a?flour"?>view>
????????????<view?class="a?flour"?>view>
????????????<view?class="a?flour"?>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?3s?linear?infinite;
}

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

.loading?.flour{
??width:?32px;
??height:?32px;
??background-color:?#00cec9;
??margin:?4px;
??animation:?scale?1.5s?linear?infinite;
}

@keyframes?scale{
??50%{
??????transform:?scale(1.2);
??}
}
.loading?.a:nth-child(1){
??border-radius:?50%?50%?0?50%;
??background-color:?#e17055;
??transform-origin:?bottom?right;
}

.loading?.a:nth-child(2){
??border-radius:?50%?50%?50%?0;
??background-color:?#fdcb6e;
??transform-origin:?bottom?left;
??animation-delay:?.5s;
}

.loading?.a:nth-child(3){
??border-radius:?50%?0?50%?50%;
??background-color:?#00cec9;
??transform-origin:?top?right;
??animation-delay:?1.5s;
}

.loading?.a:nth-child(4){
??border-radius:?0?50%?50%?50%;
??background-color:?#6c5ce7;
??transform-origin:?top?left;
??animation-delay:?1s;
}

額外發現

微信小程序

居然已支持HTML寫法

測試

wxml

<body>
????<div?class="loading-screen">
????????<div?class="loading">
????????????<span?class="flour"?>span>
????????????<span?class="flour"?>span>
????????????<span?class="flour"?>span>
????????????<span?class="flour"?>span>
????????div>
????div>
body>

wxss

*{
????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?3s?linear?infinite;
}

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

.loading?.flour{
????width:?32px;
????height:?32px;
????background-color:?#00cec9;
????margin:?4px;
????animation:?scale?1.5s?linear?infinite;
}

@keyframes?scale{
????50%{
????????transform:?scale(1.2);
????}
}

.loading?span:nth-child(1){
????border-radius:?50%?50%?0?50%;
????background-color:?#e77f67;
????transform-origin:?bottom?right;
}

.loading?span:nth-child(2){
????border-radius:?50%?50%?50%?0;
????background-color:?#778beb;
????transform-origin:?bottom?left;
????animation-delay:?.5s;
}

.loading?span:nth-child(3){
????border-radius:?50%?0?50%?50%;
????background-color:?#f8a5c2;
????transform-origin:?top?right;
????animation-delay:?1.5s;
}

.loading?span:nth-child(4){
????border-radius:?0?50%?50%?50%;
????background-color:?#f5cd79;
????transform-origin:?top?left;
????animation-delay:?1s;
}

報錯

修改

“ * ” 修改為 “page”

修改后:

page{
??margin:?0;
??padding:?0;
}
...

結果:正常運行?

說明

學習于 https://www.youtube.com/

Demo代碼已同步至小程序

寫留言|查看留言

總結

以上是生活随笔為你收集整理的微信小程序align_微信小程序四色花瓣的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。