# span
手机 手表
# 概述
格式化的文本,只能作为<text>、<a>和<span>的子组件
# 子组件
支持<span> ,<image>(image.md#作为text、span、a的子组件使用)
# 属性
| 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|
| id | <string> | - | 否 | 唯一标识 |
| style | <string> | - | 否 | 样式声明 |
| class | <string> | - | 否 | 引用样式表 |
| for | <array> | - | 否 | 根据数据列表,循环展开当前标签 |
| if | <boolean> | - | 否 | 根据数据 boolean 值,添加或移除当前标签 |
# 样式
| 名称 | 类型 | 默认值 | 必填 | 描述 |
|---|---|---|---|---|
| color | <color> | rgba(0, 0, 0, 0.54) | 否 | 文本颜色 |
| font-size | <length> | 30px | 否 | 文本尺寸 |
font-style 手表不支持 | normal | italic | normal | 否 | - |
| font-weight | normal | bold | lighter | border |number | | normal | 否 | 当前平台仅支持normal与bold两种效果,当值为数字时,低于550为前者,否则为后者。 |
font-family 手表不支持 | <string> | - | 否 | 文本字体。可设置一个有先后顺序的,由字体名或者字体族名组成的列表,以逗号分隔。列表中第一个已安装或者通过 font-face 指定的字体,会被选中作为文本的字体。 |
text-decoration 手表不支持 | underline | line-through | none | none | 否 | - |
# 事件
不支持
# span 示例代码
←
→
