# 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 当前平台仅支持normalbold两种效果,当值为数字时,低于550为前者,否则为后者。
font-family 手表不支持 <string> - 文本字体。可设置一个有先后顺序的,由字体名或者字体族名组成的列表,以逗号分隔。列表中第一个已安装或者通过 font-face 指定的字体,会被选中作为文本的字体。
text-decoration 手表不支持 underline | line-through | none none -

# 事件

不支持

# span   示例代码

查看示例代码 (opens new window)