CSS Gradient Generator

Build linear and radial gradients with a live preview, then copy the CSS in one click.

Gradient editor 2-4 color stops, live preview
Type
Angle 135°
Color stops
Live preview & code Updates as you drag

      
Preset gallery Click a swatch to load it

CSS Gradient Generator / 渐变色生成器

Create linear and radial CSS gradients visually: pick 2-4 color stops, set their positions, adjust the angle for linear gradients, and copy the ready-to-paste background declaration. No designer, no design tool - the CSS is generated locally in your browser. 在线渐变色生成器:可视化设置 2-4 个颜色节点与位置,调整角度,一键复制 background 声明,全程本地生成。

Linear vs radial / 线性还是径向?

  • Linear - blends along a straight line; set the angle from 0° (top to bottom) to 360° 沿直线过渡,可设角度
  • Radial - blends out from a center point; great for glows, spotlights and depth effects 从中心向外过渡,适合光晕效果

Use cases / 使用场景

  • Page and card backgrounds that need more depth than a flat color 页面/卡片背景
  • Buttons, badges and hero sections 按钮、徽章、头图
  • Quick brand mood tests without opening a design tool 快速试色

Privacy / 隐私说明

All gradient generation happens in your browser. No data is sent anywhere. 渐变色生成全部在浏览器本地完成,不会发送任何数据。

FAQ / 常见问题

Q: Does it work with Tailwind / CSS frameworks? / 能用在 Tailwind 里吗? - Yes, paste the generated background value into any CSS property, custom property or framework config. 生成的代码可直接用于任何 CSS 场景。

Q: How many color stops? / 支持几个颜色节点? - Two to four. More stops give smoother blends but longer CSS. 支持 2-4 个节点。

Related tools / 相关工具