01_关于幽灵空白节点检测时:div内span标签为什么要设置一个inline-block的解释

幽灵空白节点存在于行框盒子的前面(必要条件 :需要h5的文档声明)(表现形式:没有宽度,永远透明,不能通过脚本获取)

因为有现成的提问和回答,所以将截图摘于此。

原文地址:https://segmentfault.com/q/1010000014296346/a-1020000014298050

提问:

回答:

最后,感谢两位前辈提供的精确回答。

附w3c规范:

Line boxes are created as needed to hold inline-level content within an inline formatting context. Line boxes that contain no text, no preserved white space, no inline elements with non-zero margins, padding, or borders, and no other in-flow content (such as images, inline blocks or inline tables), and do not end with a preserved newline must be treated as zero-height line boxes for the purposes of determining the positions of any elements inside of them, and must be treated as not existing for any other purpose.

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值