- UID
- 320
- 主题
- 回帖
- 0
- 精华
- 积分
- 2861
- 金币
- 枚
- 草籽
- 颗
- 鲜花
- 朵
- 注册时间
- 2023-7-1
- 最后登录
- 1970-1-1
|
本帖最后由 冰心 于 2023-9-3 18:01 编辑
:doodle {
@size: 100%;
box-shadow: 20px auto;
--ww: 300px;
--prog: 0;
--tt1: '00:00';
--tt2: '00:00';
--xplace: 65%;
--yplace: 92%;
--color: Coral;
}
position: absolute;
@nth(1) {
@size: var(--ww) 2px;
@place: var(--xplace) var(--yplace);
background: silver;
:before, :after { content: ''; }
:before {
position: absolute;
left: 0;
width: var(--prog);
height: 100%;
background: var(--color);
}
:after {
width: 80%;
height: 10px;
cursor: pointer;
}
}
@nth(2) {
@size: var(--ww) 20px;
@place: var(--xplace) calc(var(--yplace) - 20px);
:before, :after{
position: absolute;
width: 80%;
height: 100%;
color: var(--color);
}
:before { content: var(--tt1); }
:after { content: var(--tt2); text-align: right; }
}
@nth(3) {
@size: 60px;
@place: var(--xplace) calc(var(--yplace) - 36px);
cursor: pointer;
z-index: 10;
animation: rot 6s infinite linear var(--state);
:after {
content: '';
@size: inherit;
clip-path: @shape( fill: evenodd;
points: 300;
scale: .45;
x: cos(2t) + cos(π - 7t);
y: sin(2t) + sin(7t);
);
background: var(--color);
}
}
@match(i ≥ 4) {
@size: 300px 300px;
@place: 520px 304px;
background: url('https://img.soogif.com/eec7c8e4bca44deba45771d76e759ef0.gif');
offset-path: path('M80 100 a240 160 0 1 0 480 0 a240 160 0 1 0 -480 0z');
animation: fly 18s calc((@size - @i) * -6.5s) infinite linear var(--state);
}
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes fly { to { offset-distance: 100%; }}
:doodle {
@size: auto 3em;
left: 50%;
top: 5%;
transform: translate(-50%);
--geci: '三月的阳光';
--motion: cover2;
--tt: 1s;
}
display: grid;
place-items: center start;
:before, :after {
content: var(--geci);
width: fit-content;
height: fit-content;
font: bold 2em Sans-serif;
color: #ccc;
text-shadow: 1px 1px 2px #000;
white-space: pre;
}
:after {
position: absolute;
white-space: pre;
width: 0;
color: SeaGreen;
overflow: hidden;
animation: var(--motion) var(--tt) linear forwards var(--state);
}
@keyframes cover1 { from { width: 0; } to { width: 100%; } }
@keyframes cover2 { from { width: 0; } to { width: 100%; } }
|
评分
-
4
查看全部评分
-
|