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
e width
Por exemplo, se quisermos criar uma borda vermelha de 5 pixels em torno de um elemento HTML, poderíamos usar essa classe: <style>
.thin-red-border {
border-color: vermelho;
largura da borda: 5 px;
estilo de borda: sólido;
}
</ style>
thick-green-border
. Essa classe deve adicionar uma borda verde sólida de 10 pixels em torno de um elemento HTML. Aplique a turma à sua foto de gato. Lembre-se de que você pode aplicar várias classes a um elemento usando seu atributo de class
, separando cada nome de classe com um espaço. Por exemplo: <img class="class1 class2">
img
deve ter a classe smaller-image
.
testString: 'assert($("img").hasClass("smaller-image"), "Your img
element should have the class smaller-image
.");'
- text: Seu elemento img
deve ter a classe thick-green-border
.
testString: 'assert($("img").hasClass("thick-green-border"), "Your img
element should have the class thick-green-border
.");'
- text: Dê à sua imagem uma largura de borda de 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: Dê à sua imagem um estilo de borda solid
.
testString: 'assert($("img").css("border-right-style") === "solid", "Give your image a border style of solid
.");'
- text: A borda em volta do seu elemento img
deve ser verde.
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: