freeCodeCamp/curriculum/challenges/chinese/03-front-end-libraries/bootstrap/apply-the-default-bootstrap...

30 lines
534 B
Markdown
Raw Normal View History

---
id: bad87fee1348bd9aec908850
title: 给 Bootstrap 按钮添加默认样式
challengeType: 0
forumTopicId: 16657
---
# --description--
Bootstrap 还有另外一种属于按钮的 class 属性叫做 `btn-default`
`button` 元素增加两个 class `btn``btn-default`
# --hints--
`btn` class 添加到所有的 `button` 元素中。
```js
assert($('.btn').length > 5);
```
`btn-default` class 添加到每一个 `button` 元素中。
```js
assert($('.btn-default').length > 5);
```
# --solutions--