2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
id: 587d781c367417b2b2512ac4
|
2020-12-16 00:37:30 -07:00
|
|
|
title: 设置段落文本的 font-size
|
2018-10-10 18:03:03 -04:00
|
|
|
challengeType: 0
|
2020-02-11 15:46:34 +08:00
|
|
|
videoUrl: 'https://scrimba.com/c/cVJ36Cr'
|
|
|
|
forumTopicId: 301068
|
2018-10-10 18:03:03 -04:00
|
|
|
---
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --description--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
CSS 里面的 `font-size` 属性不只限于标题,它可以应用于任何包含文字的元素内。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --instructions--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
把段落的 `font-size` 设置为 16px 让它看起来更清晰。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --hints--
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
你的 `p` 标签应该包含一个 `font-size` 属性并且值为 `16px`。
|
2018-10-10 18:03:03 -04:00
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
```js
|
|
|
|
assert($('p').css('font-size') == '16px');
|
2018-10-10 18:03:03 -04:00
|
|
|
```
|
|
|
|
|
2020-12-16 00:37:30 -07:00
|
|
|
# --solutions--
|
2020-02-11 15:46:34 +08:00
|
|
|
|