css 高宽判断

/×width: expression(this.width > 100 && this.width > this.height ? 100: true);
 height: expression(this.height > 100 ? 100: true);
width: expression(this.width > 100 ? 100: true);×/

 

====================
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最小宽度
max-width: 600px;
 _width:expression(document.body.clientWidth > 600 ? "600px" : "auto");
 /*_width:expression(document.body.clientWidth < 300 ? "300px" : "auto"); 这是min-width */
--------------------------------
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")
  );
}
====================

现在最大高度,按比例缩小

 max-height:1000px;
max-width:1000px;
height: expression(this.height > 1000 ? 1000: true);

posted @ 2014-07-04 17:12  天边、浅吟  阅读(1114)  评论(0编辑  收藏  举报