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
和width
等属性。例如,如果我们想要在HTML元素周围创建一个红色的5像素边框,我们可以使用此类: <风格>
.thin-red-border {
边框颜色:红色;
border-width:5px;
边框式:坚固;
}
</样式>
thick-green-border
。这个类应该在HTML元素周围添加一个10px的实心绿色边框。将课程应用于您的猫照片。请记住,您可以使用其class
属性将多个类应用于元素,方法是使用空格分隔每个类名。例如: <img class="class1 class2">
img
元素应该具有smaller-image
类。
testString: 'assert($("img").hasClass("smaller-image"), "Your img
element should have the class smaller-image
.");'
- text: 你的img
元素应该有类thick-green-border
。
testString: 'assert($("img").hasClass("thick-green-border"), "Your img
element should have the class thick-green-border
.");'
- text: 为图像提供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: 为您的图像提供solid
的边框样式。
testString: 'assert($("img").css("border-right-style") === "solid", "Give your image a border style of solid
.");'
- text: img
元素周围的边框应为绿色。
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: