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
Lobster
字体。为此,请复制以下代码段并将其粘贴到代码编辑器的顶部(在开始style
元素之前): <link href="https://fonts.googleapis.com/css?family=Lobster" rel="stylesheet" type="text/css">
现在,您可以使用Lobster
作为FAMILY_NAME在CSS中使用Lobster
字体,如下例所示: font-family: FAMILY_NAME, GENERIC_NAME;
。 GENERIC_NAME是可选的,如果其他指定的字体不可用,则为后备字体。这将在下一个挑战中得到体现。系列名称区分大小写,如果名称中有空格,则需要用引号括起来。例如,您需要引号才能使用"Open Sans"
字体,但不能使用Lobster
字体。 Lobster
字体的font-family
CSS规则,并确保它将应用于您的h2
元素。 Lobster
字体。
testString: 'assert(new RegExp("googleapis", "gi").test(code), "Import the Lobster
font.");'
- text: 你的h2
元素应该使用字体Lobster
。
testString: 'assert($("h2").css("font-family").match(/lobster/i), "Your h2
element should use the font Lobster
.");'
- text: 使用h2
CSS选择器更改字体。
testString: 'assert(/\s*h2\s*\{\s*font-family\:\s*(\"|")?Lobster(\"|")?\s*;\s*\}/gi.test(code), "Use an h2
CSS selector to change the font.");'
- text: 你的p
元素仍然应该使用字体monospace
。
testString: 'assert($("p").css("font-family").match(/monospace/i), "Your p
element should still use the font monospace
.");'
```
Click here to view more cat photos.
Things cats love:
Top 3 things cats hate: