YL

BACKGROUND & DECOR

圆锥渐变背景Conic Gradient Background

绕中心旋转的色轮,配深色径向蒙版——中心内容、边缘流光。

中英对照

中文
圆锥渐变背景
英文
Conic Gradient Background
别名
角向渐变、旋转色轮、Conic Sweep
一句话
绕中心旋转的色轮,配深色径向蒙版——中心内容、边缘流光。

效果预览

边缘流光旋转 · 中心留给内容

适合用在哪

AI 产品 Hero、创意工具、颁奖/活动页。

不适合:需要安静阅读或长表格的页面;边缘流光过亮会让正文对比度崩溃。

和相近模式的区别

光束射线Light Rays / Sunburst

光束射线是手工排布的明暗扇区,偏仪式/复古;圆锥渐变是连续色轮旋转,偏 AI/创意工具。

流光边框卡片Conic Border Card / Animated Gradient Border

卡片圆锥边是描边特效;圆锥渐变背景是整块舞台底,中心用径向深色蒙版留给内容。

容易踩的坑

  • 旋转层 inset 不足 -40%,转到 45° 时会露出直角空白边。
  • 直接动画 conic-gradient 的 from 角度需要逐帧重绘,CPU 占用远高于 rotate 整层。
  • 无限旋转未在 prefers-reduced-motion 下停止,长时间盯看易引发眩晕。

设计提示词 · Prompt

圆锥渐变背景(Conic Gradient):一个超大元素(inset:-40% 以上,确保旋转时不露边)铺 conic-gradient(from 0deg, 色1, 色2, 色3, 色1),animation 匀速旋转 8-12s linear。上面盖一层径向深色蒙版(radial-gradient,中心 80% 不透明深色),只让边缘漏出彩轮——形成"中心舞台 + 流光边缘"的构图。rotate 整层元素而非动画角度(性能更好)。与深色产品截图、白色大标题组合效果最佳。
Conic Gradient: One oversized element (inset:-40% or more, so no edges show while rotating) filled with conic-gradient(from 0deg, color1, color2, color3, color1), animated with a constant 8-12s linear rotation. Cover it with a dark radial mask (radial-gradient, 80% opaque dark at the center) so only the edges reveal the color wheel — creating a "center stage + flowing light edges" composition. Rotate the whole layer rather than animating the angle (better performance). Works best with dark product screenshots and large white headlines.

可复制 CSS

自包含的最小实现,粘贴到空白页面即可生效;类名可以按项目规范改名。

/* 旋转色轮 + 中心深色蒙版 */
.conic-bg {
  position: relative;
  min-height: 280px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #09090b;
  color: #fff;
  font: 650 16px/1.3 system-ui, sans-serif;
}
.conic-bg__wheel {
  position: absolute;
  inset: -45%;
  background: conic-gradient(from 0deg, #6366f1, #ec4899, #22d3ee, #6366f1);
  animation: conic-spin 10s linear infinite;
}
.conic-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(9, 9, 11, .92) 0%, rgba(9, 9, 11, .55) 42%, transparent 72%);
  pointer-events: none;
}
.conic-bg > b { position: relative; z-index: 1; }
@keyframes conic-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .conic-bg__wheel { animation: none; }
}

演示 HTML 结构

<div class="s s--abs d-conicbg">
  <b>边缘流光旋转 · 中心留给内容</b>
</div>

性能要点

  • 旋转整层元素(transform),不要每帧改 conic-gradient 角度。
  • 元素 inset 扩到 -40% 以上,旋转时才不露边。

常见问题

圆锥渐变背景的英文是什么?

圆锥渐变背景的英文是 Conic Gradient Background。常见英文别名还包括 Conic Sweep。

Conic Gradient Background 的中文是什么?

Conic Gradient Background 的中文是「圆锥渐变背景」。常见中文别名还包括 角向渐变、旋转色轮。绕中心旋转的色轮,配深色径向蒙版——中心内容、边缘流光。

转速多久一圈?

匀速 8–12s(示例 10s)。更快像灯笼,更慢几乎看不出「流光」。

中心蒙版为什么必要?

没有径向深色罩,色轮会直冲标题,可读性与「中心舞台」构图都会垮。

常见搭配

同一页面里经常和「圆锥渐变背景」一起出现的模式,可以收藏后用「组合收藏为整页提示词」一起交给 AI。

标签