最小高度min-height是很有用的,但IE6却不支持。真烦人。有没有办法呢?我们可以利用IE6不识别!important来实现:
height:auto!important;
height:500px;
min-height:500px;
这3句代码就让IE6也有了高度min-height的效果,大家可以把下面的代码复制保存成网页文件看看效果。
<!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=gb2312" />
<title>残缺 完美 生活</title>
</head>
<style type="text/css">
*{
margin:0;
padding:0;
}
body{
font-family:Arial, Helvetica,宋体,sans-serif;
font-size:12px;
text-align:center;
background-color:#D4D5CC;
}
#wrapper{
height:auto!important;
height:500px;
min-height:500px;
width:760px;
background-color:#e5e5e5;
border:1px solid #fff;
text-align:left;
line-height:150%;
padding:20px;
margin:10px auto;
}
</style>
<body>
<div id="wrapper">
The Furthest Distance In The World <br />
世界上最遥远的距离 <br />
Tagore泰戈尔 <br />
The furthest distance in the world <br />
世界上最遥远的距离 <br />
Is not between life and death <br />
不是生与死 <br />
But when I stand in front of you <br />
而是 我就站在你面前 <br />
Yet you don't know that I love you <br />
你却不知道我爱你 <br />
</div>
</body>
</html>



选择表情