最新
动画Fade In On Scroll
Content that fades and rises into place as it enters the viewport.
#scroll#reveal#fade
6 个框架中级
A card wrapped in a conic gradient border that rotates continuously.
<style>
@keyframes border-spin { to { transform: translate(-50%, -50%) rotate(1turn); } }
.border-spin { animation: border-spin 4s linear infinite; }
@media (prefers-reduced-motion: reduce) { .border-spin { animation: none; } }
</style>
<div class="relative max-w-xs overflow-hidden rounded-2xl p-0.5">
<span class="border-spin absolute left-1/2 top-1/2 z-0 aspect-square w-[220%]" style="background: conic-gradient(from 0deg, #6366f1, #ec4899, #f59e0b, #6366f1); transform: translate(-50%, -50%);" aria-hidden="true"></span>
<div class="relative z-10 rounded-[14px] bg-white px-5 py-4 dark:bg-gray-900">
<h3 class="text-base font-semibold text-gray-900 dark:text-gray-100">Premium tier</h3>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">Unlock every module and priority support.</p>
</div>
</div>| Prop | 类型 | 默认值 | 说明 |
|---|---|---|---|
children必填 | ReactNode | - | 在组件内部渲染的内容。 |
borderWidth | number | 2 | Border width |
className | string | '' | 合并到根元素上的额外类名。 |
Set `borderWidth` and swap the conic stops. Reduced motion holds the gradient still while keeping the lit border.