欢迎访问 生活随笔!

尊龙游戏旗舰厅官网

当前位置: 尊龙游戏旗舰厅官网 > 前端技术 > css >内容正文

css

html块状元素高度,css:如何计算块元素的高度? -尊龙游戏旗舰厅官网

发布时间:2024/9/27 css 10 豆豆
尊龙游戏旗舰厅官网 收集整理的这篇文章主要介绍了 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:如何计算块元素的高度?的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得尊龙游戏旗舰厅官网网站内容还不错,欢迎将尊龙游戏旗舰厅官网推荐给好友。

  • 上一篇:
  • 下一篇:
网站地图