cu_Cbear 发表于 2012-01-04 21:15

IE 中的最大最小寬度和高度 css 高度 (兼容版本)


IE 中的最大最小寬度和高度 css 高度 (兼容版本)








Html代码1./* 最小寬度 */
2..min_width{
3.    min-width:300px;/* sets max-width for IE */
4.    _width:expression(document.body.clientwidth < 300 ? "300px" : "auto");
5.}
6.   
7./* 最大寬度 */
8..max_width{
9.    max-width:600px;/* sets max-width for ie */   
10.    _width:expression(document.body.clientwidth > 600 ? "600px" : "auto");
11.}
12.   
13./* 最小高度 */
14..min_height{   
15.    min-height:200px;/* sets min-height for ie */   
16.    _height:expression(this.scrollheight < 200 ? "200px" : "auto");
17.}
18.   
19./* 最大高度 */
20..max_height{   
21.    max-height:400px;/* sets max-height for ie */   
22.    _height:expression(this.scrollheight > 400 ? "400px" : "auto");
23.}
24.   
25./* 最大最小寬度 */
26..min_and_max_width{   
27.    min-width:300px;   
28.    max-width:600px;/* sets min-width & max-width for ie */   
29.    _width: expression(document.body.clientwidth < 300 ? "300px":(document.body.clientwidth > 600 ? "600px" : "auto"));
30.}
31.   
32./* 最大最小高度 */
33..min_and_max_height{   
34.    min-height:200px;   
35.    max-height:400px;/* sets min-height & max-height for ie */   
36.    _height: expression(this.scrollheight < 200 ? "200px" :( this.scrollheight > 400 ? "400px" : "auto"));
37.}

冰释一片天 发表于 2012-01-04 21:15

谢谢分享
页: [1]
查看完整版本: IE 中的最大最小寬度和高度 css 高度 (兼容版本)