diff --git a/zh-cn/application-dev/reference/arkui-js/js-components-custom-style.md b/zh-cn/application-dev/reference/arkui-js/js-components-custom-style.md index 22582efbc280da31be640178f319797810ac1d5a..a3aabeb266dac0d7e8cfb8219084fb0734e71204 100644 --- a/zh-cn/application-dev/reference/arkui-js/js-components-custom-style.md +++ b/zh-cn/application-dev/reference/arkui-js/js-components-custom-style.md @@ -1,20 +1,16 @@ -​ - -# 继承样式 9+ - -> ![icon-note.gif](D:/git/doc/docs/zh-cn/application-dev/reference/arkui-js/public_sys-resources/icon-note.gif) **说明:** +# 继承样式 +> **说明:** > 从api version 9开始支持。 自定义组件具有inhert-class属性,定义如下: -| 名称 | 类型 | 默认值 | 必填 | 描述 | -| ------------------------- | ------ | ------ | ---- | ------------------------------------------------------ | -| inhert-class9+ | string | - | 否 | 从父组件继承的class样式,多个class样式之间用空格分隔。 | +| 名称 | 类型 | 默认值 | 必填 | 描述 | +| ------------ | ------ | ------ | ---- | ------------------------------------------------------ | +| inhert-class | string | - | 否 | 从父组件继承的class样式,多个class样式之间用空格分隔。 | -可以通过设置inhert-calss属性来继承父组件的样式,代码示例如下: +可以通过设置inhert-calss属性来继承父组件的样式。 自定义组件的hml文件,其中fatherclass1和fatherclass2是从父组件继承的样式。 - ```html
@@ -23,10 +19,7 @@
``` - - 父页面的hml文件,其中comp自定组件通过inhert-class属性,继承了父组件的fatherclass1和fatherclass2样式。 - ```html @@ -36,10 +29,7 @@ ``` - - 父页面的css文件 - ```html // xxx.css .fatherclass1 { @@ -50,10 +40,4 @@ background-color:green; border:2px; } -``` - - - -
- -
+``` \ No newline at end of file