:doodle { @size: 100%; box-shadow: 20px auto; --ww: 300px; --prog: 0; --tt1: '00:00'; --tt2: '00:00'; --xplace: 50%; --yplace: 98%; --color: snow; } 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: 100%; height: 10px; cursor: pointer; } } @nth(2) { @size: var(--ww) 20px; @place: var(--xplace) calc(var(--yplace) - 20px); :before, :after{ position: absolute; width: 100%; 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; animation: rot 6s infinite linear var(--state); :after { content: ''; @size: inherit; @shape: clover 4; background: var(--color); } } @match(i ≥ 4) { @size: 100px 88px; @place: 50px 44px; background: url('https://638183.freep.cn/638183/t22/gif/ying1.gif'); offset-path: path('M50 44 Q500 300 900 44'); offset-distance: 0%; animation: fly 10s calc((@size - @i) * -2.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: 'HUACHAO'; --motion: cover2; --tt: 1s; } display: grid; place-items: center start; :before, :after { content: var(--geci); width: fit-content; height: fit-content; font: bold 2.4em Sans-serif; color: #ccc; text-shadow: 1px 1px 2px #000; white-space: pre; } :after { position: absolute; white-space: pre; width: 0; color: green; 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%; } }