Skip to content
Related Articles

Related Articles

SVG EllipseElement.cy property
  • Last Updated : 28 Oct, 2020

The SVG EllipseElement.cy property Returns an SVGAnimatedLength object corresponding to the attribute of the given ellipse element

Syntax:

EllipseElement.cy

Return value: This property returns SVGAnimatedLength object that can be used get the cy of the Ellipse element

Example 1: 

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<body>
    <svg width="300" height="200" xmlns="http://www.w3.org/2000/svg">
  <ellipse cx="100" cy="100" rx="100" ry="60" id="ellipse"
      onclick="outputSize();"/>
          <script>
              var g = document.getElementById("ellipse");
              console.log(g.cy)
          </script>
    </svg>
</body>
  
</html>

chevron_right


Output:



Example 2: 

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<body>
    <svg width="300" height="200" xmlns="http://www.w3.org/2000/svg">
  <ellipse cx="100" cy="150" rx="100" ry="60" id="ellipse"
      onclick="outputSize();"/>
          <script>
              var g = document.getElementById("ellipse");
              console.log(g.cy)
          </script>
    </svg>
</body>
  
</html>

chevron_right


Output:

full-stack-img

My Personal Notes arrow_drop_up
Recommended Articles
Page :