弘帝企业智能建站系统交流平台

 找回密码
 立即注册
查看: 3147|回复: 0

CSS:IE6最大宽度最小宽度最大高度最小高度的代码

[复制链接]
发表于 2014-3-21 08:32:42 | 显示全部楼层 |阅读模式
img{_width:expression(this.width > 200 ? "200px" : this.width); }
img{_width:expression(this.width > 550 ? "550px" : true);}
.max_width{ _width:expression(document.body.clientWidth > 600 ? "600px" : "auto");}
.max_width{_width:expression((document.documentElement.clientWidth||document.body.clientWidth)>310?"310px":"");}

img{_width:expression(this.width < 200 ? "200px" : this.width); }
img{_width:expression(this.width < 550 ? "550px" : true);}
.min_width{_width:expression(document.body.clientWidth < 300 ? "300px" : "auto");}

img{_height:expression(this.height > 200 ? "200px" : this.height); }
img{height:expression(this.height > 550 ? "550px" : true);}
.max_height{ _height:expression(this.scrollHeight > 400 ? "400px" : "auto");}
.max_height{ _height:expression((document.documentElement.clientHeight||document.body.clientHeight)>600?"600px":"")}

img{_height:expression(this.height < 200 ? "200px" : this.height); }
img{_height:expression(this.height < 550 ? "550px" : true);}
.min_height{_height:expression(this.scrollHeight < 200 ? "200px" : "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")
  );
}

IE6最大最小高度
.min_and_max_height{
  min-height:200px;  max-height:400px;
  _height: expression(
    this.scrollHeight < 200 ? "200px" : (this.scrollHeight > 400 ? "400px" : "auto")
  );
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|弘帝企业智能建站系统 ( 皖ICP备07503252号 )

GMT+8, 2024-4-28 00:47 , Processed in 0.065215 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表