Example
Each example includes ui & video explanation & pretty source code .
ctrl + f
0
- video
- ui
- pretty source code
Visible
- 千
- 里
- 之
- 行
- ,
- 始
- 于
- 足
- 下
- 。
video
jsx
export function TextRotate() {
const TEXT = [ "千", "里", "之", "行", ",", "始", "于", "足", "下", "。" ];
const LEN = TEXT.length;
const D = 360 / LEN;
return (
<div className="size-96 p-5 select-none [--r:140px]">
<ul className="relative size-full rounded-full
animate-spin animate-duration-3000
shadow-2xl shadow-slate-400">
{
TEXT.map((letter, i) => (
<li className="absolute size-fit inset-0 m-auto"
style={ {
transform: `rotate(${ D * i }deg) translateY(var(--r))`
} }
key={ i }>
<span className="font-orbitron text-2xl">{ letter }</span>
</li>
))
}
</ul>
</div>
)
}
Pretty
More Beautiful Ideas
For You .
















css-infinite-scrollcss 无限滚动逻辑实现
images-waterfall-flow图片瀑布流兼响应式最简单实现方式
hash-encrypt散列算法典型加密逻辑及实现
exclusive-button排他按钮的典型实现
dnd-use-sortablednd/kit 库多元素中拖拽排序效果
motion-layout-iduse layoutId prop 多元素变动中进行过渡动画
special-background渐变背景生成田子网格背景
motion-variantsmotion variants prop 推迟每个子元素动画
text-gradientcss 文字渐变效果
scroll-progress-barmotion useScroll hook 进度条控制
css-3d-carouselcss 3d 卡片轮播效果