各类型盒子的基线的确定,各类型盒子基线分享


The baseline of an ‘inline-block’ is the baseline of its last line box in the normal flow, unless it has either no in-flow line boxes or if its ‘overflow’ property has a computed value other than ‘visible’, in which case the baseline is the bottom margin edge.

bottom margin edge

就是它所包含的那些文字的基线

The baseline of an ‘inline-table’ is the baseline of the first row of the table

每个block一般都含有很多行的元素,所以它的基线也有很多条,每条对应一个line-box,line-box的基线确定稍复杂,看第二章

拿一行中高度最高的Flex-item的第一行文字的基线当做flex-box当前行的基线

  • 首先不同于其他类型的盒子,CSS 2.1 does not define the position of the line box’s baseline,所以它的基线是不确定的,会随着行内元素的内容或样式的改变而改变。具体怎么改变看第二小节
  • 哪些因素会影响line-box的基线的位置
  • 当一行内有一个elem与line-box同等高度时
  • 因为元素已经与当前行等高了,所以在这个elem上设置的vertical-align对它本身是没有视觉上的任何效果的,但会影响当前line-box的基线的位置。
  • 当一行内有多个vertical-align值互不相同的元素时, line-box的基线的位置也会为了同时满足这些个所有的vertical-align值而把line-box的基线移动到恰当的位置为止,常常伴随浙line-box的高度也会随之变化

 

 

www.dengb.comtruehttps://www.dengb.com/HTML_CSS/1304457.htmlTechArticle各类型盒子的基线的确定,各类型盒子基线 确定盒子的基线的规则 1.1 确定inline-block的基线 The baseline of an ‘inline-block’ is the baseline of its la…

—-想了解更多的css相关样式处理怎么解决关注<计算机技术网(www.ctvol.com)!!>

本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。

ctvol管理联系方式QQ:251552304

本文章地址:https://www.ctvol.com/csstutorial/109226.html

(0)
上一篇 2020年5月4日
下一篇 2020年5月4日

精彩推荐