--- id: bad87fee1348bd9aede08807 title: Set the Font Family of an Element challengeType: 0 videoUrl: '' localeTitle: 设置元素的字体系列 --- ## Description
您可以使用font-family属性设置元素应使用的font-family 。例如,如果要将h2元素的字体设置为sans-serif ,则可以使用以下CSS:
h2 {
font-family:sans-serif;
}
## Instructions
使所有p元素都使用monospace字体。
## Tests
```yml tests: - text: 你的p元素应该使用字体monospace 。 testString: 'assert($("p").not(".red-text").css("font-family").match(/monospace/i), "Your p elements should use the font monospace.");' ```
## Challenge Seed
```html

CatPhotoApp

Click here to view more cat photos.

A cute orange cat lying on its back.

Things cats love:

  • cat nip
  • laser pointers
  • lasagna

Top 3 things cats hate:

  1. flea treatment
  2. thunder
  3. other cats


```
## Solution
```js // solution required ```