相容IE的最小最大高度CSS寫法

來源:互聯網
上載者:User
 .min_width{min-width:300px;

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

.max_width{
max-width:600px;

_width:expression_r(document.body.clientWidth > 600 ? "600px" : "auto");
}

.min_height{
min-height:200px;

_height:expression_r(this.scrollHeight < 200 ? "200px" : "auto");
}

.max_height{
max-height:400px;

_height:expression_r(this.scrollHeight > 400 ? "400px" : "auto");
}

.min_and_max_width{
min-width:300px;
max-width:600px;

_width: expression_r(
document.body.clientWidth < 300 ? "300px" :
( document.body.clientWidth > 600 ? "600px" : "auto")
);
}

.min_and_max_height{
min-height:200px;
max-height:400px;

_height: expression_r(
this.scrollHeight < 200 ? "200px" :
( this.scrollHeight > 400 ? "400px" : "auto")
);
}

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.