浏览器在js,css方面不兼容的问题,已经围绕了web开发者很久了,很期待有一种浏览器有一个统一的规范,不过有差异才有进步,也许若干年后,web开发者再也不用考虑这个问题了,也许会出现一种兼容调整工具,但是现在我们必须解决这类兼容问题。
1、IE6支持max-height解决方法
.yangshi{max-height:100px;_height:expression((document.documentElement.clientHeight||document.body.clientHeight)<100?"100px":"");overflow:hidden;}
让IE6支持最大高度max-height的时候别忘记加上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"));}