2015-06-17 18:22:20 +08:00
|
|
|
# 按钮状态
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2015-06-17 18:22:20 +08:00
|
|
|
- order: 3
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2015-06-17 18:22:20 +08:00
|
|
|
通过背景色透明度的变化来体现不同的操作状态。
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2015-06-17 18:22:20 +08:00
|
|
|
通过 `:hover` `:active` 伪状态实现,如需要表现出同 `:active` 的外观时可以添加 `.active` 类。
|
2015-06-05 20:26:41 +08:00
|
|
|
|
2015-06-17 18:22:20 +08:00
|
|
|
失效状态:为 `<button>` 元素添加 `disabled` 属性,即可体现。
|
2015-06-05 20:26:41 +08:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
````html
|
2015-06-08 16:15:03 +08:00
|
|
|
<button class="ant-btn ant-btn-primary">主按钮</button>
|
2015-07-05 17:40:52 +08:00
|
|
|
<button class="ant-btn ant-btn-primary hover">主按钮(hover)</button>
|
2015-06-08 16:15:03 +08:00
|
|
|
<button class="ant-btn ant-btn-primary active">主按钮(激活)</button>
|
|
|
|
<button class="ant-btn ant-btn-primary disabled">主按钮(失效)</button>
|
|
|
|
<p></p>
|
2015-06-11 17:16:32 +08:00
|
|
|
<button class="ant-btn">次按钮</button>
|
2015-07-05 17:40:52 +08:00
|
|
|
<button class="ant-btn hover">次按钮(hover)</button>
|
2015-06-11 17:16:32 +08:00
|
|
|
<button class="ant-btn active">次按钮(激活)</button>
|
|
|
|
<button class="ant-btn disabled">次按钮(失效)</button>
|
2015-06-08 16:15:03 +08:00
|
|
|
<p></p>
|
|
|
|
<button class="ant-btn ant-btn-ghost">幽灵按钮</button>
|
2015-07-05 17:40:52 +08:00
|
|
|
<button class="ant-btn ant-btn-ghost hover">幽灵按钮(hover)</button>
|
2015-06-08 16:15:03 +08:00
|
|
|
<button class="ant-btn ant-btn-ghost active">幽灵按钮(激活)</button>
|
|
|
|
<button class="ant-btn ant-btn-ghost disabled">幽灵按钮(失效)</button>
|
2015-06-05 20:26:41 +08:00
|
|
|
````
|