freeCodeCamp/curriculum/challenges/chinese/01-responsive-web-design/applied-visual-design/set-the-line-height-of-para...

62 lines
1.7 KiB
Markdown

---
id: 587d781d367417b2b2512ac5
challengeType: 0
videoUrl: 'https://scrimba.com/c/crVWdcv'
forumTopicId: 301070
title: 设置段落的 line-height
---
## Description
<section id='description'>
CSS 提供 <code>line-height</code> 属性来设置行间的距离。行高,顾名思义,用来设置每行文字所占据的垂直空间。
</section>
## Instructions
<section id='instructions'>
<code>p</code> 标签添加 <code>line-height</code> 属性并赋值 25px。
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: '你应该给 <code>p</code> 标签添加 <code>line-height</code> 属性并赋值 <code>25px</code>。'
testString: assert($('p').css('line-height') == '25px');
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='html-seed'>
```html
<style>
p {
font-size: 16px;
}
</style>
<p>
天地玄黄 宇宙洪荒 日月盈昃 辰宿列张 寒来暑往 秋收冬藏 闰余成岁 律召调阳 云腾致雨 露结为霜 金生丽水 玉出昆冈 剑号巨阙 珠称夜光 果珍李柰 菜重芥姜 海咸河淡 鳞潜羽翔 龙师火帝 鸟官人皇 始制文字 乃服衣裳 推位让国 有虞陶唐 吊民伐罪 周发殷汤 坐朝问道 垂拱平章 爱育黎首 臣伏戎羌 遐迩壹体 率宾归王 鸣凤在树 白驹食场 化被草木 赖及万方 盖此身发 四大五常 恭惟鞠养 岂敢毁伤 女慕贞絜 男效才良 知过必改 得能莫忘 罔谈彼短 靡恃己长 信使可覆 器欲难量 墨悲丝染 诗讃羔羊
</p>
```
</div>
</section>
## Solution
<section id='solution'>
```html
// solution required
```
</section>