2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
id: bad87fee1348bd9aec908850
|
2020-12-16 00:37:30 -07:00
|
|
|
|
title: 给 Bootstrap 按钮添加默认样式
|
2018-10-10 18:03:03 -04:00
|
|
|
|
challengeType: 0
|
2020-09-07 16:17:39 +08:00
|
|
|
|
forumTopicId: 16657
|
2018-10-10 18:03:03 -04:00
|
|
|
|
---
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --description--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
Bootstrap 还有另外一种属于按钮的 class 属性叫做 `btn-default`。
|
2020-09-07 16:17:39 +08:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
为 `button` 元素增加两个 class: `btn` 和 `btn-default`。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --hints--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
将 `btn` class 添加到所有的 `button` 元素中。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
```js
|
|
|
|
|
assert($('.btn').length > 5);
|
2018-10-10 18:03:03 -04:00
|
|
|
|
```
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
将 `btn-default` class 添加到每一个 `button` 元素中。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
```js
|
|
|
|
|
assert($('.btn-default').length > 5);
|
2018-10-10 18:03:03 -04:00
|
|
|
|
```
|
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
|
# --solutions--
|
2020-08-13 17:24:35 +02:00
|
|
|
|
|