--- id: bad87fee1348bd9acde08712 title: Use Responsive Design with Bootstrap Fluid Containers challengeType: 0 videoUrl: '' localeTitle: 使用具有Bootstrap Fluid Containers的响应式设计 --- ## Description
在freeCodeCamp的HTML5和CSS部分,我们构建了一个Cat Photo App。现在让我们回到它。这一次,我们将使用流行的Bootstrap响应式CSS框架来设计它。 Bootstrap将通过调整HTML元素的大小来确定屏幕的宽度和响应 - 因此称为Responsive Design 。通过响应式设计,您无需设计网站的移动版本。在具有任何宽度的屏幕的设备上看起来都很好。您可以通过将以下代码添加到HTML顶部来将Bootstrap添加到任何应用程序: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>在这种情况下,我们已经在幕后为您添加了这个页面。请注意,使用>/>关闭link标记是可以接受的。首先,我们应该将所有HTML( link标签和style元素除外)嵌套在带有container-fluid类的div元素container-fluid
## Instructions
## Tests
```yml tests: - text: 你的div元素应该有class container-fluid 。 testString: 'assert($("div").hasClass("container-fluid"), "Your div element should have the class container-fluid.");' - text: 确保你的div元素有一个结束标记。 testString: 'assert(code.match(/<\/div>/g) && code.match(/
/g).length === code.match(/
div element has a closing tag.");' - text: 确保在.container-fluid的结束style标记之后嵌套了所有HTML元素。 testString: 'assert($(".container-fluid").children().length >= 8, "Make sure you have nested all HTML elements after the closing style tag in .container-fluid.");' ```
## Challenge Seed
```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

Things cats love:

Top 3 things cats hate:

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