(转载)div最小宽度和自适应的实现方法

时间:2024-06-20 14:37:26
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>div最小宽度和自适应的实现方法</title>
<style> *{ padding:0; margin:0;} #div1{ min-width:1000px; height:396px; position:relative; overflow:hidden;} *html .ie6_out{ margin-left:1000px; zoom:1;}
*html .ie6_in{ position:relative; float:left; margin-left:-1000px;} </style> </head>
<body>
<!--[if lte IE 6]>
<div class="ie6_out">
<div class="ie6_in">
<![endif]--> <div id="div1"> 内容
</div> <!--[if lte IE 6]>
</div>
</div>
<![endif]-->
</body>
</html>

相关文章