--- id: bad87fee1348bd9acde08812 title: Make Images Mobile Responsive challengeType: 0 videoUrl: '' localeTitle: 使图像移动响应 --- ## Description
首先,在现有图像下方添加新图像。将其src属性设置为https://bit.ly/fcc-running-cats 。如果这个图像可以正好是我们手机屏幕的宽度,那就太好了。幸运的是,使用Bootstrap,我们需要做的就是将img-responsive类添加到您的图像中。这样做,图像应完全适合您的页面宽度。
## Instructions
## Tests
```yml tests: - text: 你应该总共有两个图像。 testString: 'assert($("img").length === 2, "You should have a total of two images.");' - text: 您的新图像应该低于旧图像并且具有img-responsive类。 testString: 'assert($("img:eq(1)").hasClass("img-responsive"), "Your new image should be below your old one and have the class img-responsive.");' - text: 您的新图片不应该具有smaller-image类。 testString: 'assert(!$("img:eq(1)").hasClass("smaller-image"), "Your new image should not have the class smaller-image.");' - text: '您的新图片应该具有https://bit.ly/fcc-running-catssrc 。' testString: 'assert($("img:eq(1)").attr("src") === "https://bit.ly/fcc-running-cats", "Your new image should have a src of https://bit.ly/fcc-running-cats.");' - text: 确保新的img元素具有关闭角括号。 testString: 'assert(code.match(//g).length === 2 && code.match(/img element has a closing angle bracket.");' ```
## Challenge Seed
```html

CatPhotoApp

Click here for cat photos.

A cute orange cat lying on its back.

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 ```