W3cubDocs

/DOM

SVGCircleElement.cx

« SVG Attribute reference home

For the <circle> and the <ellipse> elements, this attribute define the x-coordinate of the center of the element. If unspecified, the effect is as if the value is set to "0".

For the <radialGradient> element, this attribute defines the x-coordinate of the largest (i.e., outermost) circle for the radial gradient. The gradient will be drawn such that 100% gradient stop is mapped to the perimeter of the largest (i.e., outermost) circle. If the attribute is not specified, the effect is as if a value of 50% were set.

Usage context

Categories None
Value <coordinate>
Animatable Yes
Normative document SVG 1.1 (2nd Edition): The SVGCircleElement
SVG 1.1 (2nd Edition): The SVGEllipseElement
SVG 1.1 (2nd Edition): The SVGRadialGradientElement
<coordinate>

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.

Example

To be added

Elements

The following elements can use the cx 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/API/SVGCircleElement/cx