mozilla

Revision 427147 of ry

  • Revision slug: Web/SVG/Attribute/ry
  • Revision title: ry
  • Revision id: 427147
  • Created:
  • Creator: Jeremie
  • Is current revision? Yes
  • Comment 2 words added, 2 words removedSVG/Attribute/ry Web/SVG/Attribute/ry

Revision Content

« SVG Attribute reference home

For the {{ SVGElement("ellipse") }} element, this attribute defines the y-radius of the element. A value of zero disables rendering of the element.

For the {{ SVGElement("rect") }} element, this attribute defines the y-axis radius of the ellipse used to round off the corners of the rectangle. If a properly specified value is provided for ry but not for {{ SVGAttr("rx") }} (or the opposite), then the browser will consider the missing value equal to the defined one. If neither ry nor {{ SVGAttr("rx") }} has a properly specified value, then the browser will draw a rectangle with square corners. If ry is greater than half of the width of the rectangle, then the browser will consider the value for ry as half of the width of the rectangle.

Usage context

Categories None
Value <length>
Animatable Yes
Normative document SVG 1.1 (2nd Edition): The ellipse element
SVG 1.1 (2nd Edition): The rect element

{{ page("/en/SVG/Content_type","Length") }}

Example

Elements

The following elements can use the ry attribute

  • {{ SVGElement("ellipse") }}
  • {{ SVGElement("rect") }}

Revision Source

<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
<p>For the {{ SVGElement("ellipse") }} element, this attribute defines the y-radius of the element. A value of zero disables rendering of the element.</p>
<p>For the {{ SVGElement("rect") }} element, this attribute defines the y-axis radius of the ellipse used to round off the corners of the rectangle. If a properly specified value is provided for <code>ry</code> but not for {{ SVGAttr("rx") }} (or the opposite), then the browser will consider the missing value equal to the defined one. If neither <code>ry</code> nor {{ SVGAttr("rx") }} has a properly specified value, then the browser will draw a rectangle with square corners. If <code>ry</code> is greater than half of the width of the rectangle, then the browser will consider the value for <code>ry</code> as half of the width of the rectangle.</p>
<h2 id="Usage_context">Usage context</h2>
<table class="standard-table"> <tbody> <tr> <th scope="row">Categories</th> <td>None</td> </tr> <tr> <th scope="row">Value</th> <td><a href="/en/SVG/Content_type#Length" title="https://developer.mozilla.org/en/SVG/Content_type#Length">&lt;length&gt;</a></td> </tr> <tr> <th scope="row">Animatable</th> <td>Yes</td> </tr> <tr> <th scope="row">Normative document</th> <td><a class="external" href="http://www.w3.org/TR/SVG/shapes.html#EllipseElementRYAttribute" title="http://www.w3.org/TR/SVG/shapes.html#EllipseElementRYAttribute">SVG 1.1 (2nd Edition): The ellipse element</a><br> <a class="external" href="http://www.w3.org/TR/SVG/shapes.html#RectElementRYAttribute" title="http://www.w3.org/TR/SVG/shapes.html#RectElementRYAttribute">SVG 1.1 (2nd Edition): The rect element</a></td> </tr> </tbody>
</table>
<p>{{ page("/en/SVG/Content_type","Length") }}</p>
<h2 id="Example">Example</h2>
<h2 id="Elements">Elements</h2>
<p>The following elements can use the <code>ry</code> attribute</p>
<ul> <li>{{ SVGElement("ellipse") }}</li> <li>{{ SVGElement("rect") }}</li>
</ul>
Revert to this revision