ry

The ry attribute defines a radius on the y-axis.

You can use this attribute with the following SVG elements:

Example

html
<svg viewBox="0 0 300 200" xmlns="http://www.w3.org/2000/svg">
  <ellipse cx="50" cy="50" ry="0" rx="25" />
  <ellipse cx="150" cy="50" ry="25" rx="25" />
  <ellipse cx="250" cy="50" ry="50" rx="25" />

  <rect x="20" y="120" width="60" height="60" ry="0" rx="15" />
  <rect x="120" y="120" width="60" height="60" ry="15" rx="15" />
  <rect x="220" y="120" width="60" height="60" ry="150" rx="15" />
</svg>

ellipse

For <ellipse>, ry defines the y-radius of the shape. With a value lower or equal to zero the ellipse won't be drawn at all.

Value<length> | <percentage> | auto
Default valueauto
AnimatableYes

Note: The y-radius of the <ellipse> can also be defined with the ry geometry property. If set in CSS, the ry property value overrides the ry attribute value.

rect

For <rect>, ry defines the y-axis radius of the ellipse used to round off the corners of the rectangle.

The way the value of the ry attribute is interpreted depend on both the rx attribute and the width of the rectangle:

Value<length> | <percentage> | auto
Default valueauto
AnimatableYes

Note: The vertical curve of the corners of the <rect> can also be defined with the ry geometry property. If set in CSS, the ry property value overrides the ry attribute value.

Specifications

See also