CSS中的position:absolute无父级默认相对于body还是html 引发的一系列思考
关于position:absolute绝对定位元素相对于最近的非 static 祖先元素定位。当这样的祖先元素不存在时,则相对于ICB(inital container block, 初始包含块)。-----------------MDN官网ICB(inital container block, 初始包含块)关于包含块什么是包含块:大多数情况下,包含块就是这个元素最近的祖先块元素的内容区,但也不是总是这样。包含块的确定:确定一个元素的包含块的过程完全依赖于这个元素的 position
原创
2021-06-27 07:04:46 ·
588 阅读 ·
0 评论