baseline如何发布_父盒子的baseline 的位置取决于什么?

这段大概解释了line box中基线的位置

CSS 2.1 does not define the position of the line box's baseline (i.e., the position of the strut, see below).

然后这段话说的字体之间会按基线对齐,但有也提到没有字体的时候,行内框的基线是strut,也就解释了inline box基线的位置

User agent must align the glyphs in a non-replaced inline box to each other by their relevant baselines. Then, for each glyph, determine the A and D. Note that glyphs in a single element may come from different fonts and thus need not all have the same A and D. If the inline box contains no glyphs at all, it is considered to contain a strut (an invisible glyph of zero width) with the A and D of the element's first available font.

有了以上两条,可以以知道对于行内级元素他的parent box不论是inline box还是line box对齐都是参照strut(0宽字符)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值