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
that controls an element's width. Just like with fonts, we'll use px
(pixels) to specify the image's width.
For example, if we wanted to create a CSS class called larger-image
that gave HTML elements a width of 500 pixels, we'd use:
<style>
.larger-image {
width: 500px;
}
</style>
smaller-image
and use it to resize the image so that it's only 100 pixels wide.
Noteimg
element should have the class 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: Your image should be 100 pixels wide. Browser zoom should be at 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: