栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > Html/CSS > CSS教程

兼容IE6的网页最小最大宽度和最小最大高度css写法

CSS教程 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

兼容IE6的网页最小最大宽度和最小最大高度css写法

最小宽度:

复制代码代码如下:
.min_width{
min-width:300px;

_width:expression(document.body.clientWidth < 300 ? "300px" : "auto");
}
最大宽度

复制代码代码如下:.max_width{
max-width:600px;

_width:expression(document.body.clientWidth > 600 ? "600px" : "auto");
}
最小高度

复制代码代码如下:.min_height{
min-height:200px;

_height:expression(this.scrollHeight < 200 ? "200px" : "auto");
}
最大高度

复制代码代码如下:.max_height{
max-height:400px;

_height:expression(this.scrollHeight > 400 ? "400px" : "auto");
}
最大最小寬度

复制代码代码如下:.min_and_max_width{
min-width:300px;
max-width:600px;

_width: expression(document.body.clientWidth < 300 ? "300px" :( document.body.clientWidth > 600 ? "600px" : "auto"));
}
最大最小高度

复制代码代码如下:.min_and_max_height{
min-height:200px;
max-height:400px;

_height: expression(this.scrollHeight < 200 ? "200px" :( this.scrollHeight > 400 ? "400px" : "auto"));
}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/217043.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号