最新
动画Fade In On Scroll
Content that fades and rises into place as it enters the viewport.
#scroll#reveal#fade
6 个框架中级
Text overlaid with two clipped color clones that jitter for a glitch look.
<style>
@keyframes glitch-1 {
0%, 100% { clip-path: inset(0 0 85% 0); transform: translate(0, 0); }
20% { clip-path: inset(20% 0 40% 0); transform: translate(-2px, -1px); }
40% { clip-path: inset(60% 0 10% 0); transform: translate(2px, 1px); }
60% { clip-path: inset(10% 0 60% 0); transform: translate(-1px, 1px); }
80% { clip-path: inset(40% 0 30% 0); transform: translate(1px, -1px); }
}
@keyframes glitch-2 {
0%, 100% { clip-path: inset(80% 0 5% 0); transform: translate(0, 0); }
25% { clip-path: inset(10% 0 70% 0); transform: translate(2px, 1px); }
50% { clip-path: inset(50% 0 30% 0); transform: translate(-2px, -1px); }
75% { clip-path: inset(30% 0 45% 0); transform: translate(1px, 1px); }
}
.glitch-a { animation: glitch-1 2.4s infinite linear alternate; }
.glitch-b { animation: glitch-2 2.8s infinite linear alternate; }
@media (prefers-reduced-motion: reduce) { .glitch-a, .glitch-b { animation: none; opacity: 0; } }
</style>
<span class="relative inline-block text-3xl font-bold text-gray-900 dark:text-gray-100">
<span class="relative z-10">SYSTEM ERROR</span>
<span class="glitch-a absolute left-0 top-0 z-0 text-cyan-400" aria-hidden="true">SYSTEM ERROR</span>
<span class="glitch-b absolute left-0 top-0 z-0 text-fuchsia-500" aria-hidden="true">SYSTEM ERROR</span>
</span>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
text必填 | string | - | 按下按钮时写入剪贴板的字符串。 |
className | string | '' | 合并到根元素上的额外类名。 |
Recolor the two clone layers for different glitch palettes. The base text stays readable and reduced motion stills the clones.