所有浏览器的简单最小高度
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了所有浏览器的简单最小高度相关的知识,希望对你有一定的参考价值。
This snippet uses html>body instead of * html. Works in all modern-browsers, degrades to just height for older browsers.
#minHeightItem { height: 100px; /* this is the height that IE6 and other older browsers will use */ } /* "html>body" is preferred over other methods because it is valid CSS, it doesn't have problems with specificity that other methods have, and it is forwards compatible */ html>body #minHeightItem { height: auto; /* reset the height for compliant browsers */ min-height: 100px; }
以上是关于所有浏览器的简单最小高度的主要内容,如果未能解决你的问题,请参考以下文章