2015-08-15 76 views

回答

8

CSS 2.1规范解释9.4.2 Inline formatting contextshttp://www.w3.org/TR/CSS2/visuren.html#inline-formatting

包含形成一条线的框被称为线箱的矩形区域的概念。

...

当几个行内盒不能在单个线箱内水平适合,它们被两个或更多个垂直堆栈线框之间分布。因此,一个段落是一个垂直的线条框。

...

当一个行内框超过线框的宽度,它被分为若干个框和这些框跨若干行框分布。如果内联框不能拆分(例如,如果内联框中包含单个字符,或者特定于语言的单词中断规则不允许在内联框中打断,或者内联框受到nowrap或pre-space的空白值的影响),然后内联框溢出线框。

+0

该文件已经过时了。你不应该引用它。只需使用CSS2.1即可。 – BoltClock

+0

更正,谢谢! – sbedulin

3

在这个小提琴中,您还可以看到包含线条本身的那种盒子就是线框。它也有边界。 http://jsfiddle.net/LyVf5/

HTML:

<p> 
    <span>With HTML/CSS, *everything* is laid out using a box.</span> 
    <br> 
    <br> 
    <span>This is a &lt;span>. It has a border around it, so you can see how your browser positions it. Notice that when the line wraps, the "box" that the line is in wraps also. Maybe this is what you're asking about? More text... This is a &lt;span>. It has a border around it. Notice that when the line wraps, the "box" that the line is in wraps also. More text...</span> 
</p> 

CSS:

p{ 
    margin: 2em; 
} 
span{ 
    border: 1px dotted gray; 
    line-height: 150%; 
    padding: 3px; 
} 
+4

不错的演示,但实际上它是*内联框*有边框,而不是线框。 – Alohci