--- id: bad87fee1348cd8acef08812 title: Create a Block Element Bootstrap Button challengeType: 0 videoUrl: '' localeTitle: 创建一个块元素引导按钮 --- ## Description
通常,具有btnbtn-default类的button元素仅与它们包含的文本一样宽。例如: <button class="btn btn-default">Submit</button>此按钮只能与“提交”一词一样宽。 通过使用附加的btn-block类来阻止元素,您的按钮将拉伸以填充页面的整个水平空间,其后面的任何元素将流到块下方的“新行”。 <button class="btn btn-default btn-block">Submit</button>此按钮占用可用宽度的100%。 请注意,这些按钮仍需要btn类。将Bootstrap的btn-block类添加到Bootstrap按钮。
## Instructions
## Tests
```yml tests: - text: 你的按钮应该仍然有btnbtn-default类。 testString: 'assert($("button").hasClass("btn") && $("button").hasClass("btn-default"), "Your button should still have the btn and btn-default classes.");' - text: 你的按钮应该有类btn-block 。 testString: 'assert($("button").hasClass("btn-block"), "Your button should have the class btn-block.");' - text: 确保所有button元素都有一个结束标记。 testString: 'assert(code.match(/<\/button>/g) && code.match(/
## Challenge Seed
```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back. Three kittens running towards the camera.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```
## Solution
```js // solution required ```