SVG RectElement.ry Property
Last Updated :
30 Mar, 2022
The SVG RectElement.ry property is used to return an SVGAnimatedLength object corresponding to the attribute of the given rectangle element.
Syntax:
RectElement.ry
Return Value: This property returns an SVGAnimatedLength object that can be used to get the “ry” value and other properties of the rectangle element.
Example 1:
HTML
<!DOCTYPE html>
< html >
< body >
< h1 style = "color: green" >
GeeksforGeeks
</ h1 >
< h3 >SVG RectElement.ry property</ h3 >
< svg width = "300" height = "300"
< rect width = "100" height = '190'
fill = "green" id = "gfg" rx = 10 ry = 30 />
< script >
var g = document.getElementById("gfg");
console.log(g.ry)
</ script >
</ svg >
</ body >
</ html >
|
Output:
Example 2:
HTML
<!DOCTYPE html>
< html >
< body >
< h1 style = "color: green" >
GeeksforGeeks
</ h1 >
< h3 >SVG RectElement.ry property</ h3 >
< svg width = "300" height = "300"
< rect width = "100" height = '190'
fill = "green" id = "gfg" rx = 10 % ry = 35 % />
< script >
var g = document.getElementById("gfg");
console.log(g.ry)
</ script >
</ svg >
</ body >
</ html >
|
Output:
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...