首页 > Web开发 > 详细

网页自适应宽度

时间:2014-03-13 05:58:14      阅读:482      评论:0      收藏:0      [点我收藏+]

min-width:设置最小宽度(在IE不支持)。

expression_r():IE支持,可在样式中嵌入脚本。

 

<title>宽度自适应测试</title>
<style type="text/css">
body{margin:0px;padding:0px;}
.content{width:100%; height:800px; min-width:980px; width:expression_r((documentElement.clientWidth < 980) ? "980px" : "100%" );}
.left{width:24%; height:500px; margin-left:1%; background:#0066CC; float:left;}
.center{width:50%; height:500px; float:left; background:#993300;}
.right{width:24%; height:500px; float:left; background:#CC9900;}
</style>
</head>

<body>
<center>
<div class="content">
<div class="left"></div>
<div class="center"></div>
<div class="right"></div>
</div>
</center>
</body>

网页自适应宽度,布布扣,bubuko.com

网页自适应宽度

原文:http://www.cnblogs.com/tsyblog/p/3596675.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!