openharmony 鸿蒙 js-components-svg-ellipse

2025-06-12 浏览 (1)

ellipse

NOTE

This component is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.

The <ellipse> component is used to draw oval shapes.

Required Permissions

None

Child Components

The following are supported: <animate>, <animateMotion>, and <animateTransform>.

Attributes

The universal attributes and the attributes listed below are supported.

NameTypeDefault ValueMandatoryDescription
idstring-NoUnique ID of the component.
cx<length>|<percentage>0NoX-coordinate of the oval shape. Attribute animations are supported.
cy<length>|<percentage>0NoY-coordinate of the oval shape. Attribute animations are supported.
rx<length>|<percentage>0NoRadius of the oval shape on the x-axis. Attribute animations are supported.
ry<length>|<percentage>0NoRadius of the oval shape on the y-axis. Attribute animations are supported.

Example

<!-- xxx.hml -->
<div class="container">
  <svg fill="white" width="400" height="400">
    <ellipse cx="60" cy="200" rx="50" ry="100" stroke-width="4" fill="red" stroke="blue"></ellipse>
    <ellipse cx="220" cy="200" rx="100" ry="50" stroke-width="5" stroke="red" stroke-dasharray="10 5" stroke-dashoffset="3"></ellipse>
  </svg>
</div>

en-us_image_0000001173164793

你可能感兴趣的鸿蒙文章

harmony 鸿蒙JavaScript-compatible Web-like Development Paradigm (ArkUI.Full)

harmony 鸿蒙Data Type Attributes

harmony 鸿蒙button

harmony 鸿蒙chart

harmony 鸿蒙divider

harmony 鸿蒙image-animator

harmony 鸿蒙image

harmony 鸿蒙input

harmony 鸿蒙label

harmony 鸿蒙marquee

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/jx00Km