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.

We’d love to hear your thoughts on the next set of proposals for the JavaScript language. You can find a description of the proposals here.
Please take two minutes to fill out our short survey.

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>, <discard>, <script>, <set>, <stop>, <style>

Example

Atributos

Atributos globais

Atributos específicos

Interface DOM

Este elemento implementa a interface SVGLinearGradientElement.

Compatibilidade com navegadores

Veja também