-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css] 第21天 说说你对line-height是如何理解的? #71
Comments
|
line-height的高度单位建议使用em、rem,这样就可以避免因为容器高度变化引起的行高差异。 |
行高属性,表示一行是字体的多大倍数,比如line-height: 1, line-height: 1.5就分表表示一行高度是当前字体大小的一倍,或1.5倍 |
另外对于非替换元素的纯内联元素,其高度是由 参考文章: |
请问一下,如果高度设置的是百分比该怎么使用line-height居中?还是说有其他方法 |
|
line-height行高,会以lineheight的值取中线,来展示元素的位置 |
MDN没有欺骗你,但是也请仔细看看em的定义,这两个应该可以划等号 |
行高,可以用来控制单行文字的占位高度 |
** 对于块级元素,它指定元素行盒(line boxes)的最小高度。 对于非替代的 inline 元素,它用于计算行盒(line box)的高度。 两行文字基线之间的高度距离 ## 属性值
|
line-height行高 |
"line-height" 属性用于控制文本行之间的行高(行间距)。它可以影响到文本在行框内的垂直对齐方式和整体间距的外观。下面是我对这个属性的理解:
总结起来,"line-height" 属性是控制文本行与行之间的垂直间距的一种方式。通过设置适当的行高值,可以影响文本的垂直对齐方式和整体间距,以满足设计和排版的需求。 |
具体来说,
通过调整 需要注意的是, |
第21天 说说你对line-height是如何理解的?
The text was updated successfully, but these errors were encountered: