Click here to view more cat photos.
Things cats love:
- cat nip
- laser pointers
- lasagna
Top 3 things cats hate:
- flea treatment
- thunder
- other cats
width
的属性,用于控制元素的宽度。就像字体一样,我们将使用px
(像素)来指定图像的宽度。例如,如果我们想要创建一个名为larger-image
的CSS类,它给HTML元素的宽度为500像素,我们将使用: <风格>
.larger-image {
宽度:500px;
}
</样式>
smaller-image
的类,并使用它来调整图像大小,使其只有100像素宽。 注意 img
元素应该具有smaller-image
类。
testString: 'assert($("img[src="https://bit.ly/fcc-relaxing-cat"]").attr("class") === "smaller-image", "Your img
element should have the class smaller-image
.");'
- text: 您的图片应为100像素宽。浏览器缩放应为100%。
testString: 'assert($("img").width() === 100, "Your image should be 100 pixels wide. Browser zoom should be at 100%.");'
```
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: