html块状元素高度,css:如何计算块元素的高度? -尊龙游戏旗舰厅官网
block-level non-replaced elements in normal flow when ‘overflow’ computes to ‘visible’
this section also applies to block-level non-replaced elements in normal flow when ‘overflow’ does not compute to ‘visible’ but has been propagated to the viewport.
[. . .]
if ‘height’ is ‘auto’,the height depends on whether the element has any block-level children and whether it has padding or borders:
if it only has inline-level children,the height is the distance between the top of the topmost line box and the bottom of the bottommost line box.
if it has block-level children,the height is the distance between the top border-edge of the topmost block-level child box that does not have margins collapsed through it and the bottom border-edge of the bottommost block-level child box that does not have margins collapsed through it.
[. . . ]
only children in the normal flow are taken into account (i.e.,floating boxes and absolutely positioned boxes are ignored,and relatively positioned boxes are considered without their offset).
[. . . ]
block-level,non-replaced elements in normal flow when ‘overflow’ does not compute to ‘visible’ (except if the ‘overflow’ property’s value has been propagated to the viewport).
if ‘height’ is ‘auto’,07001.
总结
以上是尊龙游戏旗舰厅官网为你收集整理的html块状元素高度,css:如何计算块元素的高度?的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇:
- 下一篇: