update style

This commit is contained in:
Timi
2025-12-17 16:16:10 +08:00
parent 423775c255
commit 369cfe2bf2
40 changed files with 375 additions and 507 deletions

View File

@ -1,4 +1,6 @@
{
"component": true,
"usingComponents": {}
"usingComponents": {
"t-icon": "tdesign-miniprogram/icon/icon"
}
}

View File

@ -23,31 +23,9 @@ page {
}
.snowflake {
width: 10px;
height: 10px;
color: var(--theme-brand-gao);
display: block;
position: absolute;
animation: snowflakeFall linear infinite;
&::before,
&::after {
content: '';
position: absolute;
background: var(--theme-brand-gao);
opacity: .8;
}
&::before {
top: 45%;
left: 0;
width: 100%;
height: 10%;
}
&::after {
left: 45%;
width: 10%;
height: 100%;
}
}
}

View File

@ -20,7 +20,7 @@ Component({
createSnowflake() {
const snowflake = {
x: Toolkit.random(0, this.data.docWidth),
s: Toolkit.random(6, 20),
s: Toolkit.random(16, 64),
speed: Toolkit.random(14, 26)
};
this.setData({

View File

@ -1,9 +1,10 @@
<!--components/background/snow/index.wxml-->
<view class="snowflakes" style="width: {{docWidth}}px; height: {{docHeight}}px;">
<view
<t-icon
class="snowflake"
wx:for="{{snowflakes}}"
wx:key="index"
style="left: {{item.x}}px; width: {{item.s}}px; height: {{item.s}}px; animation-duration: {{item.speed}}s;"
></view>
style="left: {{item.x}}px; font-size: {{item.s}}rpx; animation-duration: {{item.speed}}s;"
name="snowflake"
/>
</view>