--- id: bad88fee1348ce8acef08815 title: Use the Bootstrap Grid to Put Elements Side By Side challengeType: 0 videoUrl: '' localeTitle: 使用Bootstrap网格并排放置元素 --- ## Description
Bootstrap使用响应式12列网格系统,可以轻松地将元素放入行中并指定每个元素的相对宽度。 Bootstrap的大多数类都可以应用于div元素。 Bootstrap具有不同的列宽属性,具体取决于用户屏幕的宽度。例如,手机屏幕较窄,笔记本电脑屏幕较宽。以Bootstrap的col-md-*类为例。这里, md表示中等, *是指定元素应该有多少列的数字。在这种情况下,正在指定中型屏幕(例如笔记本电脑)上的元素的列宽。在我们正在构建的Cat照片应用程序中,我们将使用col-xs-* ,其中xs表示超小(如超小型手机屏幕), *是指示列宽多少列的列数元素应该是。通过将所有三个嵌套在一个<div class="row">元素中,然后将它们中的每一个<div class="col-xs-4">元素中,将LikeInfoDelete按钮并排放置。 row类应用于div ,按钮本身可以嵌套在其中。
## Instructions
## Tests
```yml tests: - text: 您的按钮应全部嵌套在具有类row的同一div元素中。 testString: 'assert($("div.row:has(button)").length > 0, "Your buttons should all be nested within the same div element with the class row.");' - text: 每个Bootstrap按钮都应嵌套在自己的div元素中,类别为col-xs-4 。 testString: 'assert($("div.col-xs-4:has(button)").length > 2, "Each of your Bootstrap buttons should be nested within its own div element with the class col-xs-4.");' - 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 ```