ie浏览器不兼容max和min该怎么解决ie的兼容性问题

来源:3-5 height属性

慕先生7564418

2017-07-19 11:42:57

ie浏览器不兼容max和min该怎么解决ie的兼容性问题

写回答

1回答

樱桃小胖子

2017-07-19

1、IE6支持max-width解决方法

.test{
    max-width:1000px;
    _width:expression((document.documentElement.clientWidth||document.body.clientWidth)<1000?"1000px":"");
    overflow:hidden;
}

说明:①max-width:1000px; 这个是IE6以上级其它品牌浏览器支持最大范围宽度。而②_width:expression((document.documentElement.clientWidth||document.body.clientWidth)<1000?"1000px":"");overflow:hidden;则是让IE6支持max-width替代CSS代码,但效果和其它版本浏览器相同效果。

2、IE6支持min-width解决方法

.test{
    min-width:1000px;
    _width:expression((document.documentElement.clientWidth||document.body.clientWidth)>1000?"1000px":"");
}

说明:①min-width:1000px; 这个是IE6以上级其它品牌浏览器支持最大范围宽度。而②_width:expression((document.documentElement.clientWidth||document.body.clientWidth)>1000?"1000px":"");则是让IE6支持min-width替代CSS代码,但效果和其它版本浏览器相同效果。

3、IE6支持max-height解决方法 

 .test{
     max-height:1000px;
     _height:expression((document.documentElement.clientHeight||document.body.clientHeight)<1000?"1000px":"");
     overflow:hidden;
}

说明:①max-height:1000px; 这个是IE6以上级其它品牌浏览器支持最大范围高度。而②_height:expression((document.documentElement.clientHeight||document.body.clientHeight)<1000?"1000px":"");overflow:hidden;则是让IE6支持max-height替代CSS代码,但效果和其它版本浏览器相同效果。

4、IE6支持min-height解决方法

.test{
    min-height:1000px;
    _height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":"");
}

说明:①min-height:1000px; 这个是IE6以上级其它品牌浏览器支持最小范围高度。而②_height:expression((document.documentElement.clientHeight||document.body.clientHeight)>1000?"1000px":"");则是让IE6支持css min-height替代CSS代码,但效果和其它版本浏览器相同效果。

希望可以帮到你!

1

0 学习 · 36712 问题

查看课程