---
title: ellipse
slug: Web/SVG/Element/ellipse
tags:
- SVG
- SVG图形
- 元素
- 参考
translation_of: Web/SVG/Element/ellipse
---
{{SVGRef}}
ellipse
元素是一个SVG基本形状,用来创建一个椭圆,基于一个中心坐标以及它们的x
半径和y
半径。
椭圆不能指定精确的椭圆倾向(假设,举个例子,你想画一个45度角倾斜的椭圆),但是可以利用{{ SVGAttr("transform") }}属性实现旋转。
用法
{{svginfo}}
示例
» ellipse.svg
属性
全局属性
- 条件处理属性 »
- 核心属性 »
- 图形事件属性 »
- 外观属性 »
- {{ SVGAttr("class") }}
- {{ SVGAttr("style") }}
- {{ SVGAttr("externalResourcesRequired") }}
- {{ SVGAttr("transform") }}
专有属性
- {{ SVGAttr("cx") }}
- {{ SVGAttr("cy") }}
- {{ SVGAttr("rx") }}
- {{ SVGAttr("ry") }}
DOM 接口
该元素实现了SVGEllipseElement
接口。
浏览器兼容性
{{Compat("svg.elements.ellipse")}}
参见
- {{ SVGElement("circle") }}