让IE6 “支持”min-width

南瓜小米粥 发表于 前端开发 分类,标签: ie6 min-width
还是利用margin值可以为负来模拟实现的,margin的负值还可以实现固定大小的容器的绝对局中。代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="gb2312" />
<title>让IE6 “支持”min-width</title>
<style type="text/css">
.container {min-width:300px;height:300px;border:1px solid #000;}
* html .container {border-right: 300px solid #FFF;}
*html .holder {display: inline-block;position: relative;margin-right: -300px;}
</style>
</head>
<body>
<div class="container">
  <div class="holder">Content</div>
</div>
</body>
</html>
« 上一篇:吊牌 框架结构:下一篇 »

发表我的评论