openharmony 鸿蒙 js-components-svg-common-attributes

2025-06-12 浏览 (1)

Universal Attributes

NOTE

The APIs of this module are supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.

NameTypeDefault ValueMandatoryDescription
fill<color>blackNoFill color of an element using the shorthand attribute. Attribute animations are supported.
fill-opacitynumber1NoOpacity of a fill color. The value ranges from 0 to 1. The value 1 means opaque, and 0 means completely transparent. Attribute animations are supported.
fill-rulenonzero | evenoddnonzeroNoFill rule.
nonzero: non-zero rule.
evenodd: parity rule.
opacitynumber1NoOpacity of an element. The value ranges from 0 to 1. The value 1 means opaque, and 0 means completely transparent. Attribute animations are supported.
stroke<color>-NoColor of the stroke. Attribute animations are supported.
stroke-dasharray<string>-NoLength of the dashes and notches. The format is [length length length length]. The length values of dashes and notches are separated by a space and appear in pairs.
stroke-dashoffset<length>0NoOffset for rendering the associated dash line array. Attribute animations are supported.
stroke-linejoin[bevel | miter | round]miterNoThe shape used at the corner of a path when stroked.
bevel: connects paths with bevel corners.
miter: connects paths with mitered corners.
round: connects paths with rounded corners.
stroke-linecap[butt | round | square]buttNoThe shape used at the end of paths when stroked.
butt: The stroke for each path does not extend beyond its two endpoints.
round: At the end of each path the stroke is extended by a half circle with a diameter equal to the stroke width.
square: At the end of each path the stroke is extended by a half circle, with the width being equal to half of the stroke width, and the height being equal to the stroke width.
stroke-miterlimitnumber4NoLimit value when the sharp angle is drawn as a miter. Attribute animations are supported.
stroke-opacitynumber1NoOpacity of the stroke. The value ranges from 0 to 1. The value 1 means opaque, and 0 means completely transparent. Attribute animations are supported.
stroke-width<length>1pxNoStroke width. Attribute animations are supported.
transform<string>-NoCoordinate transformation parameters of the component and its child components.
The following formats are supported:
translate(<x> [<y>]): translates along the x[y]-axis.
scale(<x> [<y>]): scales along the x[y]-axis.
rotate(<a> [<x> <y>]): rotates at an angle of a with point (x,y) as the center.
skewX(<a>): skews at an angle of a along the x-axis.
skewY(<a>): skews at an angle of a along the y-axis.

你可能感兴趣的鸿蒙文章

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/fohBQe