动画 · 注意力引导 · 20
流光描边
流光描边 = 一圈旋转的圆锥渐变环绕元素,用来标示「实时 / 活跃 / 高端」状态。
直达修改 Prompt →
尊重 prefers-reduced-motion:动画关闭,仅保留终态。
流光描边是什么?
流光描边用一圈缓慢旋转的光(背后旋转的圆锥渐变)包住元素,读作「实时 / 高端 / 开启」。因为动的是伪元素的 transform,它始终跑在合成层。省着用:到处都在转的边框只是噪音。
动画 标本
- 触发
- mount
- 技术
- css
- 时长
- 4s
- 缓动
linear - 性能
- transform
什么时候用
- Live / recording / 'on' indicators
- Premium or featured card frames
什么时候别用
- On every card — it stops meaning anything
- Around dense text where the motion distracts
The motion lives on a pseudo-element, so the box stays still and the effect stays cheap.
Add a glow border: a rotating conic-gradient ::before behind the content, transform: rotate only.