使用方式

<link rel="stylesheet" href="/components/style/button.css" type="text/css" />

普通按钮

<button type="button" class="st_button">默认按钮</button>
<button type="button" class="st_button st_button_primary">主要按钮</button>
<button type="button" class="st_button st_button_success">成功按钮</button>
<button type="button" class="st_button st_button_info">信息按钮</button>
<button type="button" class="st_button st_button_warning">警告按钮</button>
<button type="button" class="st_button st_button_danger">危险按钮</button>

空心按钮

<button type="button" class="st_button is_plain">默认按钮</button>
<button type="button" class="st_button st_button_primary is_plain">主要按钮</button>
<button type="button" class="st_button st_button_success is_plain">成功按钮</button>
<button type="button" class="st_button st_button_info is_plain">信息按钮</button>
<button type="button" class="st_button st_button_warning is_plain">警告按钮</button>
<button type="button" class="st_button st_button_danger is_plain">危险按钮</button>

普通按钮禁用状态

<button type="button" class="st_button" disabled>禁用状态</button>
<button type="button" class="st_button st_button_primary" disabled>主要按钮</button>
<button type="button" class="st_button st_button_success" disabled>成功按钮</button>
<button type="button" class="st_button st_button_info" disabled>信息按钮</button>
<button type="button" class="st_button st_button_warning" disabled>警告按钮</button>
<button type="button" class="st_button st_button_danger" disabled>危险按钮</button>

空心按钮禁用状态

<button type="button" class="st_button is_plain" disabled>禁用状态</button>
<button type="button" class="st_button st_button_primary is_plain" disabled>主要按钮</button>
<button type="button" class="st_button st_button_success is_plain" disabled>成功按钮</button>
<button type="button" class="st_button st_button_info is_plain" disabled>信息按钮</button>
<button type="button" class="st_button st_button_warning is_plain" disabled>警告按钮</button>
<button type="button" class="st_button st_button_danger is_plain" disabled>危险按钮</button>

按钮尺寸

<button type="button" class="st_button">默认按钮</button>
<button type="button" class="st_button" size="medium">中等按钮</button>
<button type="button" class="st_button" size="small">小型按钮</button>
<button type="button" class="st_button" size="mini">超小按钮</button>

属性

属性 说明 类型 可选值 默认值
is_plain 浅色背景按钮(自定义样式) string - -
st_button_* 按钮颜色(自定义样式) string primary,success,info,warning,danger -
disabled 是否禁用(原生属性) - - -
size 尺寸(自定义属性) string medium/small/mini -

‘button’标签支持所有原生属性,属性表格仅展示常用属性,其余属性查看

属性添加位置请查看示例代码