| layout | default |
|---|---|
| title | 按钮 |
| order | 4 |
| published | true |
| category | PCUI |
可作为按钮使用的标签或元素: <a>、<button> 或 <input> 元素添加按钮类(button class)即可使用 HB-UI 提供的样式。
{% example html %}
Button button
Link button
{% endexample %}
{% example html %}
(默认样式)default (蓝色按钮)primary (绿色按钮)success (橙色按钮)warning (红色按钮)danger (黑色按钮)black link {% endexample %}
需要让按钮具有不同尺寸吗?使用 .hb-btn-lg、.hb-btn-sm 或 .hb-btn-xs 就可以获得不同尺寸的按钮。
{% example html %}
(大按钮)btn-lg (中等大小按钮)btn-lg (小按钮)btn-lg {% endexample %}
通过给按钮添加 .hb-btn-block 类可以将其拉伸至父元素100%的宽度,而且按钮也变为了块级(block)元素。
{% example html %}
块级按钮独占一行 {% endexample %}
{% example html %}
禁用按钮 {% endexample %}