当前位置:Gxlcms > css > 关于css中min-height的注意点

关于css中min-height的注意点

时间:2021-07-01 10:21:17 帮助过:55人阅读

方法一:
min-height:160px; 设置对象box的最小高度,Firefox、IE7+适用;
height:auto!important;

设置对象box的高度无自动定位,使用!important对下height高度定位设置进行优先级提升;
height:160px; 设置对象高度,因上属性!important运用,此属性只有IE6认。
方法二:
min-height:160px; 设置对象box的最小高度,Firefox、IE7+适用;
height:auto; 设置对象box的高度无自动定;
_height:160px; 设置对象高度,此属性只有IE6认,在IE6下此属性覆盖上auto属性。

在min-height容器中不能使用float属性,否则会失效。如果在大容器中使用,可在内部最后清除float,示例:

<p id="content">
  <p id="left"></p>
  <p id="right"></p>
 <p class="clear"></p>
</p>

以上就是关于css中min-height的注意点的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行