IE6支持min-height方法
IE6有许多bug,之一是不支持min-这个属性。是做UI设计时,全屏展示,但是当窗口不在最大化时,缩小到一定大小,图片会严重错位,影响页面排版,这时要设置一个最小宽度,其他浏览器都支持min-width这个属性,未读IE6不支持,以下是解决方案。
1、IE6支持max-height解决方法
.yangshi{max-height:1000px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)<1000?"1000px":"");overflow:hidden;}
2、IE6支持min-height解决方法
.yangshi{min-height:1000px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":"");}
3、IE6支持max-height又支持min-height方法
.yangshi{Max-Height:620px;Min-Height:40px;_height:expression(this.scrollHeight > 620 ? "620px" : (this.scrollHeight < 40 ? "40px" : "auto"));}
上面是最简单的方式,可能会增加服务器的负担,网上还有其他方式,可查阅借鉴一下。