--- id: bad87fee1348cd8acdf08812 title: 创建一个 Bootstrap 按钮 challengeType: 0 forumTopicId: 16811 dashedName: create-a-bootstrap-button --- # --description-- Bootstrap 的 `button` 元素有着独有的、比默认 HTML 按钮更好的样式风格。 在较大的小猫图片下方创建新的 `button` 元素。 为它添加 `btn` 与 `btn-default` 两个 classes 和 `Like` 文本。 # --hints-- 应创建一个新的包含 `Like` 文本的 `button` 元素。 ```js assert( new RegExp('like', 'gi').test($('button').text()) && $('img.img-responsive + button.btn').length > 0 ); ``` 新的按钮元素应该有两个 classes: `btn` 和 `btn-default`。 ```js assert($('button').hasClass('btn') && $('button').hasClass('btn-default')); ``` 确保所有 `button` 元素都有闭合标签。 ```js assert( code.match(/<\/button>/g) && code.match(/ ``` # --solutions-- ```html

CatPhotoApp

Click here for cat photos.

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

Things cats love:

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats
```