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.
不太理解上面引用的规范,有人能解释下么?
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.
第一句,意思是,
line boxes
的创建是为了容纳和定位其中的inline-level
元素。第二句,去掉斜体的定语,意思是,对于"不包含内容"的(不包含xx,xx,xx...上面斜体所说的那些)
line box
,存在的目的仅仅是为了定位其中的元素,并且此时这个line box
的高度为0。 除此之外,不应该以其他任何目的创建一个"不包含内容"的line box