首頁>Program>source

我正在阅讀CSS Spec 2.1,並發現难以區分的概念:

Except for table boxes, which are described in a later chapter, and replaced elements, a block-level box is also a block container box. A block container box either contains only block-level boxes or establishes an inline formatting context and thus contains only inline-level boxes. Not all block container boxes are block-level boxes: non-replaced inline blocks and non-replaced table cells are block containers but not block-level boxes. Block-level boxes that are also block containers are called block boxes.

我可以按如下解釋上面的描述吗?:

最新回復
  • 11天前
    1 #

    您的解釋正確。

    以下是一些其他详细資訊:

      The reason a table box is not a block container is because it establishes a table layout, not a block layout. Content goes into the cell elements rather than the table element, which is why it is thecellboxes that are block containers rather than the table box itself.

      A replaced element doesn't contain any other content and therefore cannot be a block container.

      The only difference between a block box and an inline-block is that the former is block-level while the latter is inline-level. Hence the display values display: blockdisplay: inline-block 分別.由於两者都是塊容器,因此其內容的格式没有區別。

      請註意,替換的元素和表格框可以是內聯級別或塊級別.內聯表和內聯替換元素只是从您引用的部分中排除,因為该部分仅与塊級框有關; 您將分別在第9节,第10节和第17节中找到對它们的引用。

      此外,即使塊容器框只能包含塊級框或行內框,您仍可以在同一个塊容器框中混合使用它们.在內部,它仅通過匿名塊框將塊級框和行內框分隔開。

  • objective c:setStatusBarOrientation:animated:在iOS 6中不起作用
  • html:POST和PHP中的原始POST有什麼區別?