rx
rx property describes the horizontal corner radius of the
rect element
ry if it is specified
autolengthpercentagerx is
never more than 50% of the used value of width for the same shape
ry
ry property describes the vertical corner radius of the
rect element
rx if it is specified
autolengthpercentagery is
never more than 50% of the used value of height for the same shape
<div class="flex-container">
<figure>
<img class="svg-img" src="../svg/svg_example_one_rounded_1.svg"
alt="rounded corners SVG diagram">
</figure>
<figure>
<img class="svg-img" src="../svg/svg_example_one_rounded_2.svg"
alt="rounded corners SVG diagram">
</figure>
<figure>
<img class="svg-img" src="../svg/svg_example_one_rounded_3.svg"
alt="rounded corners SVG diagram">
</figure>
</div>
// svg_example_one_rounded_1.svg
<svg
width="150"
height="150"
xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" rx="75" ry="75" fill="blue"/>
<text x="40"
y="50"
style="stroke:none;
fill:white;
font-size:2em;
font-family:serif;">rx 75</text>
<text x="40"
y="100"
style="stroke:none;
fill:white;
font-size:2em;
font-family:serif;">ry 75</text>
</svg>
// svg_example_one_rounded_2.svg
<svg
. . .
<rect width="100%" height="100%" rx="75" ry="25" fill="red"/>
. . .
</svg>
// svg_example_one_rounded_3.svg
<svg
. . .
<rect width="100%" height="100%" rx="25" fill="green"/>
. . .
</svg>