提交 d93110a4 编写于 作者: E ester.zhou

update ts-universal-attributes-opacity.md

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 bcd00305
# Opacity # Opacity
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **NOTE**
>
> This attribute is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version. > This attribute is supported since API version 7. Updates will be marked with a superscript to indicate their earliest API version.
The attributes described in this topic are used to set the opacity of a component. You can set the opacity of a component.
## Required Permissions ## Required Permissions
...@@ -16,15 +17,16 @@ None ...@@ -16,15 +17,16 @@ None
## Attributes ## Attributes
| Name | Type | Default Value | Description | | Name | Type | Default Value | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| opacity | number | 1 | Opacity of a component. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent. | | opacity | number&nbsp;\|&nbsp;[Resource](../../ui/ts-types.md) | 1 | Opacity of a component. The value ranges from **0** to **1**. The value **1** means opaque, and **0** means completely transparent. |
## Example ## Example
``` ```ts
// xxx.ets
@Entry @Entry
@Component @Component
struct OpacityExample { struct OpacityExample {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册