最新
动画Fade In On Scroll
Content that fades and rises into place as it enters the viewport.
#scroll#reveal#fade
6 个框架中级
A heading whose gradient fill pans continuously across the text.
<style>
@keyframes gradient-pan { to { background-position: 200% center; } }
.gradient-text {
background-image: linear-gradient(90deg, #6366f1, #ec4899, #f59e0b, #6366f1);
background-size: 200% auto;
animation: gradient-pan 6s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
.gradient-text { animation: none; background-position: 0 center; }
}
</style>
<span class="gradient-text inline-block bg-clip-text text-4xl font-bold text-transparent">
Ship something beautiful
</span>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
text必填 | string | - | 按下按钮时写入剪贴板的字符串。 |
durationMs | number | 6000 | Duration ms |
className | string | '' | 合并到根元素上的额外类名。 |
Swap the gradient stops and set `durationMs` for a faster or slower pan. Reduced motion freezes the gradient in place.