Block 元素 包括 "block-level box," "block container box," and "block box"

首先 display有以下几个属性 inline | block | list-item | inline-block | table | inline-table | table-row-group | table-header-group | table-footer-group | table-row | table-column-group | table-column | table-cell | table-caption | none | inherit

block-level boxes: display 为 block | list-item | table

block container boxes: 当设置 display 为 block | list-item | inline-block | table | inline-table | table-cell | table-caption (自己测试总结)

block boxes: block-level boxes that are also block containers are called block boxes.

几点说明:
1. a block-level box is also a block container box
2. Not all block container boxes are block-level boxes, 比如 table-cell | inline-block
3. Floats, absolutely positioned elements, block containers (such as inline-blocks, table-cells, and table-captions) that are not block boxes

-----------------------------------------------------------------------------------

Inline 元素

Inline-level boxes: 当设置 display 'inline', 'inline-table', and 'inline-block'
Inline boxes: Inline-level boxes that are not inline boxes, 比如 'inline-table', and 'inline-block'

-----------------------------------------------------------------------------------
containing block

默认元素的 position 是 static。 其它属性有 relative, absolute, fixed

position: static | relative
the containing block is formed by the content edge of the nearest block container ancestor box.

position: fixed
the containing block is established by the viewport in the case of continuous media or the page area in the case of paged media.(跟它的包裹元素设置 position: relative 或 absolute 没有关系)

position: absolute:
If the element has 'position: absolute', the containing block is established by the nearest ancestor with a 'position' of 'absolute', 'relative' or 'fixed'.
If there is no such ancestor, the containing block is the initial containing block(initial C.B.).
如果所有元素都没有设置 position, 那么html 是 initial C.B. (UA-dependent)

参考文献:
http://www.w3.org/TR/CSS2/visuren.html#block-boxes
http://www.w3.org/TR/CSS2/visuren.html#propdef-display
http://www.w3.org/TR/CSS2/visuren.html#block-formatting

http://www.w3.org/TR/CSS2/visuren.html#inline-boxes

http://www.w3.org/TR/CSS2/visudet.html#containing-block-details

最新文章

  1. (转)java自带线程池和队列详细讲解 - CSDN过天的专栏
  2. java静态方法调用&&构造函数&&静态块
  3. Java for XML: JAXP、JAXB、JAXM、JAX-RPC、JAX-WS
  4. [荐]使用jQuery清空file文件域
  5. 新浪微博之XSS蠕虫脚本源码讲解
  6. win10 enterprise 10240激活:
  7. GridView多行标题行、改造标题行、自定义标题行完美版
  8. 阿里云学习之API网关
  9. 搭建Jetbrains家族IDE授权服务器
  10. adv生成控制器手腕位置倾斜原因以及解决方案
  11. docker遇到的问题以及docker 操作镜像的基本操作
  12. AutoMapper自动映射
  13. c++数组的引用
  14. oracle exadata一体机虚拟机
  15. hyperledge fabric里order-kafka过程分析
  16. 微信小程序:block的隐藏
  17. Parallel学习
  18. ASP.net--全局程序文件:Global.asax
  19. [Assembly]汇编编写简易键盘记录器
  20. (原创)AP6212蓝牙模块在am335x控制板上的应用

热门文章

  1. opencv配置(2.49)
  2. UIControlEventTouch
  3. Codeforces Round #158 (Div. 2)
  4. hdu3078 伪LCA……
  5. LeetCode【169. Majority Element】
  6. POST内容太大的问题
  7. 如何创建 CSS
  8. VSFTP服务器
  9. SELECT INTO FROM 与 INSERT INTO SELECT区别鉴赏
  10. DevExpress中GridView上的右键菜单