For the <line>
element, this attribute define the x-axis coordinate of the end of the line. If the attribute is not specified, the effect is as if a value of 0 were specified.
For the <linearGradient>
element, this attribute define the x-axis coordinate of the end of the vector gradient onto which the <stop>
elements are mapped. If the attribute is not specified, the effect is as if a value of 100% were specified.
Categories | None |
---|---|
Value | <coordinate> |
Animatable | Yes |
Normative document |
SVG 1.1 (2nd Edition): The line element SVG 1.1 (2nd Edition): The linearGradient element |
A <coordinate> is a length in the user coordinate system that is the given distance from the origin of the user coordinate system along the relevant axis (the x-axis for X coordinates, the y-axis for Y coordinates). Its syntax is the same as that for <length>.
Within the SVG DOM, a <coordinate> is represented as an SVGLength
or an SVGAnimatedLength
.
<line>
elementSource code | Output result |
---|---|
Unable to find file x2.svg | Unable to find file x2.svg |
» x2.svg
<linearGradient>
elementSource code | Output result |
---|---|
Unable to find file linearGradient.svg | Unable to find file linearGradient.svg |
The following elements can use the x2
attribute
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/x2