Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

linearGradient

Description

The linearGradient element for SVG specifies linear gradients.

Syntax

Attributes

gradientTransform

Specifies an optional additional transformation from the gradient coordinate system onto the target coordinate system.

Value
<transform-list>
Default
identity transform

gradientUnits

Specifies the coordinate system for attributes x1, y1, x2, and y2.

Value
objectBoundingBox | userSpaceOnUse
Default
objectBoundingBox

href

Specifies a Uniform Resource Locator (URL) reference to the element.

Value
<url>
Default
(none)

spreadMethod

Specifies what happens if the gradient starts or ends inside the bounds of the target.

Value
pad | reflect | repeat
Default
pad

x1

Specifies the x-coordinate of the start of the element.

Value
<length>
Default
0%

x2

Specifies the x-coordinate of the end of the element.

Value
<length>
Default
100%

y1

Specifies the y-coordinate of the start of the element.

Value
<length>
Default
0%

y2

Specifies the y-coordinate of the end of the element.

Value
<length>
Default
0%

Examples

gradientTransform

<transform-list>

gradientUnits

objectBoundingBox

userSpaceOnUse

href

<url>

spreadMethod

pad

reflect

repeat

x1

<length>

x2

<length>

y1

<length>

y2

<length>

radialGradient

stop

World Wide Web Consortium (W3C)

HomeMenu