CSS渐变生成器
创建线性和径向CSS渐变。以可视化方式选择颜色,并复制生成的CSS。
background: linear-gradient(135deg, #535beb, #7c3aed);
如何使用本工具
- 1
Click the Color 1 swatch and choose your starting color from the native color picker.
- 2
Click the Color 2 swatch and choose the color the gradient fades into.
- 3
Drag the Angle slider from 0 to 360 degrees to set the gradient direction; the live preview updates instantly.
- 4
Copy the generated background: linear-gradient(...) line from the code box into your stylesheet.
什么是CSS渐变生成器?
CSS渐变是两种或多种颜色之间的颜色过渡。线性渐变沿一个方向流动;径向渐变则从一个点向外发散。本生成器覆盖常见场景;对于带有自定义位置的复杂多色标渐变,请手动创建。
常见使用场景
Creating a hero section or landing page banner background that fades between two brand colors.
Generating button and card backgrounds with a subtle two-tone diagonal fade.
Producing a gradient overlay placed above a photo to improve text contrast.
Prototyping color direction quickly by dragging the angle slider before committing to final values.
Grabbing a ready-to-paste linear-gradient string for a Tailwind, styled-components, or plain CSS file.
Teaching or demonstrating how gradient angle changes the visual direction of a fade.
常见问题
渐变的性能高吗?▼
我可以为渐变添加动画吗?▼
相关工具
颜色转换工具(HEX/RGB/HSL)
在HEX、RGB和HSL格式之间转换颜色。可视化选取颜色,或手动输入数值。
CSS Box Shadow生成器
以可视化方式创建CSS box-shadow值。实时预览并复制生成的CSS。
Cubic Bezier缓动曲线生成器
为CSS创建cubic-bezier缓动曲线。内置标准预设。
配色方案生成器
从任意基准色生成和谐的配色方案。支持互补色、邻近色、三角色和单色方案。
CSS Border Radius生成器
以可视化方式创建复杂的CSS border-radius值。可独立控制每个圆角。
CSS Clamp()生成器
使用clamp()生成流式、响应式的CSS数值。在视口范围内于最小值与最大值之间平滑缩放。