01_關於幽靈空白節點檢測時:div內span標籤為什麼要設定一個inline-block的解釋
阿新 • • 發佈:2018-12-18
幽靈空白節點存在於行框盒子的前面(必要條件 :需要h5的文件宣告)(表現形式:沒有寬度,永遠透明,不能通過指令碼獲取)
因為有現成的提問和回答,所以將截圖摘於此。
提問:
回答:
最後,感謝兩位前輩提供的精確回答。
附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.