1# span 2<!--Kit: ArkUI--> 3<!--Subsystem: ArkUI--> 4<!--Owner: @xiangyuan6--> 5<!--Designer: @pssea--> 6<!--Tester: @jiaoaozihao--> 7<!--Adviser: @HelloCrease--> 8 9 10作为<[text](js-service-widget-basic-text.md)>子组件提供文本修饰能力。 11 12 13> **说明:** 14> 15> 从API Version 8 开始支持。后续版本如有新增内容,则采用上角标单独标记该内容的起始版本。 16 17 18 19## 子组件 20 21支持子组件[\<span>](js-service-widget-basic-span.md)。 22 23 24## 属性 25 26支持[通用属性](js-service-widget-common-attributes.md)。 27 28 29## 样式 30 31| 名称 | 类型 | 默认值 | 必填 | 描述 | 32| -------- | -------- | -------- | -------- | -------- | 33| color | <color> | - | 否 | 设置文本段落的文本颜色。 | 34| font-size | <length> | 16px | 否 | 设置文本段落的文本尺寸。 | 35| font-style | string | normal | 否 | 设置文本段落的字体样式,见[text组件font-style的样式属性](js-service-widget-basic-text.md#样式)。 | 36| font-weight | number \| string | normal | 否 | 设置文本段落的字体粗细,见[text组件font-weight的样式属性](js-service-widget-basic-text.md#样式)。 | 37| text-decoration | string | none | 否 | 设置文本段落的文本修饰,见[text组件text-decoration样式属性](js-service-widget-basic-text.md#样式)。 | 38| font-family | string | sans-serif | 否 | 设置文本段落的字体列表,用逗号分隔,每个字体用字体名或者字体族名设置。列表中第一个系统中存在的或者通过[自定义字体](js-service-widget-common-customizing-font.md)指定的字体,会被选中作为文本的字体。 | 39 40 41## 事件 42 43不支持。 44 45## 示例 46 47详见[text示例](js-service-widget-basic-text.md#示例)。