手机
当前位置:查字典教程网 >网页设计 > Div+Css教程 >兼容IE6的网页最小最大宽度和最小最大高度css写法
兼容IE6的网页最小最大宽度和最小最大高度css写法
摘要:最小宽度:.min_width{min-width:300px;/*setsmax-widthforIE*/_width:expressio...

最小宽度:

.min_width{

min-width:300px;

/*sets max-width for IE */

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

}

最大宽度

.max_width{

max-width:600px;

/*sets max-width for IE */

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

}

最小高度

.min_height{

min-height:200px;

/* sets min-height for IE */

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

}

最大高度

.max_height{

max-height:400px;

/* sets max-height for IE */

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

}

最大最小寬度

.min_and_max_width{

min-width:300px;

max-width:600px;

/* sets min-width & max-width for IE */

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

}

最大最小高度

.min_and_max_height{

min-height:200px;

max-height:400px;

/* sets min-height & max-height for IE */

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

}

【兼容IE6的网页最小最大宽度和最小最大高度css写法】相关文章:

CSS中id和class的区别和用法

CSS+DIV实现鼠标经过背景变色

表格对决CSS

css技巧收藏——经典中的经典

div与span的区别

IE7.0以下版本列表li中的元素错位一个上一个下的解决方法

CSS盒模型制定网页的宽度和高度的原理

Hack 只针对IE的写法

CSS条状图表形式的实现方法

通过CSS禁用页面内容选中和复制操作

精品推荐
分类导航