FF,IE,谷歌浏览器 css兼容问题

来源:百度知道 编辑:UC知道 时间:2024/05/22 23:51:05
下面是一段简短的css
<!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>
<title>无标题页</title>
<link type="text/css" rel="stylesheet" href="css/list_css.css" />
<style type="text/css">
.logo_bottom_line_div
{
margin-left:100px;
margin-bottom:10px;
height:2px;
background-color:#CFF5FF;
}
</style>
</head>
<body>
<div class="logo_bottom_line_div">
</div>
</body>
</html>

为什么在FF和谷歌浏览器下显示的是一条细线(高2px的矩形) 而 IE下显示的是一个较

IE6.IE7.FF.GOOGLE浏览器测试通过

<!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>
<title>无标题页</title>
<link type="text/css" rel="stylesheet" href="css/list_css.css" />
<style type="text/css">
.logo_bottom_line_div
{
margin-left:100px;
margin-bottom:10px;
height:2px;
background-color:red; overflow:hidden;
}
</style>
</head>
<body>
<div class="logo_bottom_line_div">
</div>
</body>
</html>

设置 position:r