linearGradient

Baseline Widely available *

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

* Some parts of this feature may have varying levels of support.

O elemento linearGradient permite que os autores definam gradientes lineares para preenchimento (fill) ou contornos (stroke) de elementos gráficos.

Usage context

CategoriasElemento gradiente
Conteúdo permitidoQualquer número dos seguintes elementos, em qualquer ordem:
Elementos descritivos
<animate>, <animateTransform>, <script>, <set>, <stop>, <style>

Example

Atributos

Atributos globais

Atributos específicos

Interface DOM

Este elemento implementa a interface SVGLinearGradientElement.

Compatibilidade com navegadores

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
linearGradient
gradientTransform
gradientUnits
href
spreadMethod
x1
x2
xlink:href
Deprecated
y1
y2

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Deprecated. Not for use in new websites.

Veja também