* feat(tools): add seed/solution restore script * chore(curriculum): remove empty sections' markers * chore(curriculum): add seed + solution to Chinese * chore: remove old formatter * fix: update getChallenges parse translated challenges separately, without reference to the source * chore(curriculum): add dashedName to English * chore(curriculum): add dashedName to Chinese * refactor: remove unused challenge property 'name' * fix: relax dashedName requirement * fix: stray tag Remove stray `pre` tag from challenge file. Signed-off-by: nhcarrigan <nhcarrigan@gmail.com> Co-authored-by: nhcarrigan <nhcarrigan@gmail.com>
78 lines
1.6 KiB
Markdown
78 lines
1.6 KiB
Markdown
---
|
||
id: bad87fee1348bd9aec908850
|
||
title: 给 Bootstrap 按钮添加默认样式
|
||
challengeType: 0
|
||
forumTopicId: 16657
|
||
dashedName: apply-the-default-bootstrap-button-style
|
||
---
|
||
|
||
# --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);
|
||
```
|
||
|
||
# --seed--
|
||
|
||
## --seed-contents--
|
||
|
||
```html
|
||
<div class="container-fluid">
|
||
<h3 class="text-primary text-center">jQuery Playground</h3>
|
||
<div class="row">
|
||
<div class="col-xs-6">
|
||
<div class="well">
|
||
<button></button>
|
||
<button></button>
|
||
<button></button>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6">
|
||
<div class="well">
|
||
<button></button>
|
||
<button></button>
|
||
<button></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
```
|
||
|
||
# --solutions--
|
||
|
||
```html
|
||
<div class="container-fluid">
|
||
<h3 class="text-primary text-center">jQuery Playground</h3>
|
||
<div class="row">
|
||
<div class="col-xs-6">
|
||
<div class="well">
|
||
<button class="btn btn-default"></button>
|
||
<button class="btn btn-default"></button>
|
||
<button class="btn btn-default"></button>
|
||
</div>
|
||
</div>
|
||
<div class="col-xs-6">
|
||
<div class="well">
|
||
<button class="btn btn-default"></button>
|
||
<button class="btn btn-default"></button>
|
||
<button class="btn btn-default"></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
```
|