我必须覆盖页面的正文样式:
body{
font-size:14px;
line-height:20px;
}
Run Code Online (Sandbox Code Playgroud)
覆盖:
body{
font-size:100%;
line-height:?????;
}
Run Code Online (Sandbox Code Playgroud)
line-height如果我指定的话,财产的价值是font-size:100%多少?
这些属性之间是否有严格的关系?
Dan*_*mms 35
默认line-height是normal,所以使用:
body {
font-size: 100%;
line-height: normal;
}
Run Code Online (Sandbox Code Playgroud)
仅供参考,您可以通过打开网站,检查<body>元素和查看继承的计算样式来确认Chrome .
设置无单位值1,将计算出的字体大小(即字体的大小)乘以1,从而获得足够高的行高.
您还可以使用1.5更多的间距.
所以要完成你的代码就可以了
body{
font-size:100%;
line-height: 1.5;
}
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请参阅https://developer.mozilla.org/en-US/docs/CSS/line-height上的部分.使用无单位数表示为设置线高的首选方式.
价值观
normal取决于用户代理。桌面浏览器(包括Firefox)使用的默认值大约为
1.2,具体取决于元素的font-family。...
https://developer.mozilla.org/zh-CN/docs/Web/CSS/line-height#Values
| 归档时间: |
|
| 查看次数: |
23327 次 |
| 最近记录: |