basic.md 951 字节
Newer Older
S
simaQ 已提交
1
# 标准按钮
A
afc163 已提交
2

3 4
- order: 1 

S
simaQ 已提交
5
`<button>` `<a>``<input>` 元素添加 `.ant-btn` 类即可使用 ant-design 提供的样式。
6

S
simaQ 已提交
7 8 9 10 11 12 13
另外,通过使用下面的类可创建带有预定义样式的按钮,我们通过样式来显示重要程度的不同。

`.ant-btn-primary` `.ant-btn-ghost`

其中 `.ant-btn` 类定义了按钮的默认样式,语义上代表次按钮。

**注**: 当按钮文字为两个字时,中间需要**间隔一个字符**
A
afc163 已提交
14 15 16 17

---

````html
S
simaQ 已提交
18 19 20 21
<button class="ant-btn">Button</button>
<a href="javascript:;" class="ant-btn" role="button">Link</a>
<input class="ant-btn" type="button" value="Input" />
<input class="ant-btn" type="submit" value="Submit" />
S
simaQ 已提交
22 23 24 25 26 27 28 29 30 31 32 33

<br>

<!-- Styled Button -->
<button class="ant-btn ant-btn-primary">主按钮</button>
<button class="ant-btn">次按钮</button>
<button class="ant-btn ant-btn-ghost">幽灵按钮</button>

<br>

<button class="ant-btn ant-btn-primary">按 钮</button>

A
afc163 已提交
34
````