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
style
, color
and width
For example, if we wanted to create a red, 5 pixel border around an HTML element, we could use this class:
<style>
.thin-red-border {
border-color: red;
border-width: 5px;
border-style: solid;
}
</style>
thick-green-border
. This class should add a 10px, solid, green border around an HTML element. Apply the class to your cat photo.
Remember that you can apply multiple classes to an element using its class
attribute, by separating each class name with a space. For example:
<img class="class1 class2">
img
element should have the class smaller-image
.
testString: 'assert($("img").hasClass("smaller-image"), "Your img
element should have the class smaller-image
.");'
- text: Your img
element should have the class thick-green-border
.
testString: 'assert($("img").hasClass("thick-green-border"), "Your img
element should have the class thick-green-border
.");'
- text: Give your image a border width of 10px
.
testString: 'assert($("img").hasClass("thick-green-border") && parseInt($("img").css("border-top-width"), 10) >= 8 && parseInt($("img").css("border-top-width"), 10) <= 12, "Give your image a border width of 10px
.");'
- text: Give your image a border style of solid
.
testString: 'assert($("img").css("border-right-style") === "solid", "Give your image a border style of solid
.");'
- text: The border around your img
element should be green.
testString: 'assert($("img").css("border-left-color") === "rgb(0, 128, 0)", "The border around your img
element should be green.");'
```
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: