--- id: bad87fee1348cd8acdf08812 title: Create a Bootstrap Button challengeType: 0 forumTopicId: 16811 localeTitle: 创建一个 Bootstrap 按钮 --- ## Description
Bootstrap 的 button 元素有着独有的、比默认 HTML 按钮更好的样式风格。 在较大的小猫图片下方创建新的 button 元素。 为它添加 btnbtn-default 两个 class 和 "Like" 文本。
## Instructions
## Tests
```yml tests: - text: "创建新的 button 元素,设置文本为 'Like'。" testString: assert(new RegExp("like","gi").test($("button").text()) && ($("img.img-responsive + button.btn").length > 0)); - text: '新的按钮元素应该有两个 class : btnbtn-default。' testString: assert($("button").hasClass("btn") && $("button").hasClass("btn-default")); - text: 保证所有 button 元素都有一个闭合标签。 testString: assert(code.match(/<\/button>/g) && code.match(/ ```
## Solution
```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
```