IE6最小高度最小宽度最大高度最大宽度css写法

时间:2021-02-19 20:24:11

css方法解决IE6最小高度,IE6最小宽度,IE6最大高度,IE6最大宽度,兼容IE6/IE7/IE8/火狐。 

IE6最小高度最小宽度最大高度最大宽度html css写法总结 

IE6最小高度 

.min_height{ 
min-height
:200px;
_height
:expression(this.scrollHeight < 200 ? "200px" : "auto");
}

IE6最大高度 

.max_height{ 
max-height
:400px;
_height
:expression(this.scrollHeight > 400 ? "400px" : "auto");
}

IE6最小宽度

min-width:600px;

_width:expression(document.body.clientWidth < 300 ? "300px" : "auto");

IE6最大宽度

max-width: 600px; 
_width:expression(document.body.clientWidth > 600 ? "600px" : "auto");

IE6最大最小宽度 

.min_and_max_width{ 
min-width
:300px;
max-width
:600px;
_width
: expression(document.body.clientWidth < 300 ? "300px" :( document.body.clientWidth > 600 ? "600px" : "auto"));
}
.min_and_max_width {
border
:solid 1px red;
height
:500px;
max-width
:600px;
min-width
:300px;
_width
: expression( document.body.clientWidth < 300 ? "300px" :
( document.body.clientWidth > 600 ? "600px" : "auto") )
;
}

 

IE6最大最小高度 

.min_and_max_height{ 
min-height
:200px;
max-height
:400px;
_height
: expression(
this.scrollHeight < 200 ? "200px" :
( this.scrollHeight > 400 ? "400px" : "auto")
)
;
}