CSS规范的一点疑问

查看:92
本文介绍了CSS规范的一点疑问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题

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

这篇关于CSS规范的一点疑问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆