内联级盒和内联盒定义的矛盾(W3C)
Contradiction in Definition of Inline-Level Boxes and Inline Boxes (W3C)
W3C source for the quotes below.
The following values of the 'display' property make an element
inline-level: 'inline', 'inline-table', and 'inline-block'
因此,具有 display: inline-block
的元素是 内联级元素 。
Inline-level elements generate inline-level boxes, which are boxes
that participate in an inline formatting context.
因此,所有内联级框都参与了内联格式化上下文。
An inline box is one that is both inline-level and whose contents
participate in its containing inline formatting context
如果所有内联级框都参与内联格式化上下文,并且内联框 是一个既是 内联级框 又参与 内联格式化上下文 的框,所有 内联级框是内联框,反之亦然。
最后,下面是打破逻辑的语句:
Inline-level boxes that are not inline boxes (such as replaced
inline-level elements, inline-block elements, and inline-table
elements) are called atomic inline-level boxes...
换句话说:
首先,通过逻辑暗示,我们被告知所有 内联级框 都是 内联框 。然后,我们被告知相反的情况:那几个 内联级框 (就像那些由具有 display: inline-block
的元素生成的框),实际上 而不是 内联框.
我是不是遗漏了什么或者引述相互矛盾?
编辑
- 我在@BoltClock 找到了下面的post,真的很不错:
- 在更好地理解整个概念之后,我还 post 回答了另一个问题。可以在这里找到:Difference between inline box and atomic inline box
标准没有矛盾,但要仔细阅读才能发现差异。
- 内联级框是参与内联格式化上下文的框。
- 内联框是一个内联级框,其内容参与其包含的内联格式化上下文
段落内的span-element是行内框,因为span-element内的文本参与了段落的包围内容。
具有 display: inline-block;
的元素将与周围的内容一起流动,就好像它是一个单独的行内框一样,但由于该元素实际上会生成一个 块元素框 ,元素内容不参与其包含的内联格式化上下文。
W3C source for the quotes below.
The following values of the 'display' property make an element inline-level: 'inline', 'inline-table', and 'inline-block'
因此,具有 display: inline-block
的元素是 内联级元素 。
Inline-level elements generate inline-level boxes, which are boxes that participate in an inline formatting context.
因此,所有内联级框都参与了内联格式化上下文。
An inline box is one that is both inline-level and whose contents participate in its containing inline formatting context
如果所有内联级框都参与内联格式化上下文,并且内联框 是一个既是 内联级框 又参与 内联格式化上下文 的框,所有 内联级框是内联框,反之亦然。
最后,下面是打破逻辑的语句:
Inline-level boxes that are not inline boxes (such as replaced inline-level elements, inline-block elements, and inline-table elements) are called atomic inline-level boxes...
换句话说:
首先,通过逻辑暗示,我们被告知所有 内联级框 都是 内联框 。然后,我们被告知相反的情况:那几个 内联级框 (就像那些由具有 display: inline-block
的元素生成的框),实际上 而不是 内联框.
我是不是遗漏了什么或者引述相互矛盾?
编辑
- 我在@BoltClock 找到了下面的post,真的很不错:
- 在更好地理解整个概念之后,我还 post 回答了另一个问题。可以在这里找到:Difference between inline box and atomic inline box
标准没有矛盾,但要仔细阅读才能发现差异。
- 内联级框是参与内联格式化上下文的框。
- 内联框是一个内联级框,其内容参与其包含的内联格式化上下文
段落内的span-element是行内框,因为span-element内的文本参与了段落的包围内容。
具有 display: inline-block;
的元素将与周围的内容一起流动,就好像它是一个单独的行内框一样,但由于该元素实际上会生成一个 块元素框 ,元素内容不参与其包含的内联格式化上下文。