GradientsBaseline · Widely available
The linear-gradient() and radial-gradient() CSS functions and their repeating counterparts create backgrounds that progress smoothly between multiple colors.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1–25Not supported
26+Supportedsince Mar 26, 2013
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–3.5Not supported
3.6+Supportedsince Jan 21, 2010
Current: 157Safari
1–6Not supported
7+Supportedsince Oct 22, 2013
Current: 27MobileChrome Android
18–25Not supported
26+Supportedsince Apr 3, 2013
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1–6Not supported
7+Supportedsince Sep 18, 2013
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: gradient.
Feature detection
CSS · check before using
@supports (background-image: gradients) {
/* styles that rely on background-image: gradients */
}
/* or in JavaScript */
if (CSS.supports("background-image", "gradients")) {
// use it
}Sub-features
Support for each part of the feature (27). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| background-image.gradients | 1 | 12 | 3.6 | 4 | 18 | 4 | 3.2 |
| <gradient> | 26 | 12 | 3.6 | 7 | 26 | 4 | 7 |
| <gradient>.linear-gradient | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.linear-gradient.doubleposition | 71 | 79 | 64 | 12.1 | 71 | 64 | 12.2 |
| <gradient>.linear-gradient.interpolation_hints | 40 | 79 | 36 | 7 | 40 | 36 | 7 |
| <gradient>.linear-gradient.premultiplied_gradients | 29 | 79 | 36 | 15 | 29 | 36 | 15 |
| <gradient>.linear-gradient.single_color_stop | 135 | 135 | 136 | 18.4 | 135 | 136 | 18.4 |
| <gradient>.linear-gradient.to | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.linear-gradient.unitless_0_angle | 26 | 12 | 55 | 7 | 26 | 55 | 7 |
| <gradient>.radial-gradient | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.radial-gradient.at | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.radial-gradient.doubleposition | 71 | 79 | 64 | 12.1 | 71 | 64 | 12.2 |
| <gradient>.radial-gradient.interpolation_hints | 40 | 79 | 36 | 7 | 40 | 36 | 7 |
| <gradient>.radial-gradient.premultiplied_gradients | 29 | 79 | 36 | 15 | 29 | 36 | 15 |
| <gradient>.radial-gradient.single_color_stop | 135 | 135 | 136 | 18.4 | 135 | 136 | 18.4 |
| <gradient>.repeating-linear-gradient | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.repeating-linear-gradient.doubleposition | 71 | 79 | 64 | 12.1 | 71 | 64 | 12.2 |
| <gradient>.repeating-linear-gradient.interpolation_hints | 40 | 79 | 36 | 7 | 40 | 36 | 7 |
| <gradient>.repeating-linear-gradient.single_color_stop | 135 | 135 | 136 | 18.4 | 135 | 136 | 18.4 |
| <gradient>.repeating-linear-gradient.to | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
Show 7 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| <gradient>.repeating-linear-gradient.unitless_0_angle | 26 | 12 | 55 | 7 | 26 | 55 | 7 |
| <gradient>.repeating-radial-gradient | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.repeating-radial-gradient.at | 26 | 12 | 16 | 7 | 26 | 16 | 7 |
| <gradient>.repeating-radial-gradient.doubleposition | 71 | 79 | 64 | 12.1 | 71 | 64 | 12.2 |
| <gradient>.repeating-radial-gradient.interpolation_hints | 40 | 79 | 36 | 7 | 40 | 46 | 7 |
| <gradient>.repeating-radial-gradient.single_color_stop | 135 | 135 | 136 | 18.4 | 135 | 136 | 18.4 |
| <image> | 1 | 12 | 1 | 1 | 18 | 4 | 1 |