打印

[求助] 请教,在IE6下定义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>
<style type="text/css">
.contents_border { background:url("http://hellonicholas2001.googlepages.com/top.gif") no-repeat top left; padding-top:6px;}
.contents_border_main { background:#999; width:422px; border-left:1px solid #666; border-right:1px solid #666;}
.contents_border_hd { width:424px; height:6px; line-height:6px; background:#f60 url("http://hellonicholas2001.googlepages.com/btm.gif") no-repeat top center;}
</style>
</head>
<div class="contents_border">
<div class="contents_border_main">
<p>这是一个圆角的例子</p>
<p>结构较少</p>
<p>控制方便</p>
</div>
<div class="contents_border_hd"></div>
</div>
只有在IE6下会出现,我定义了背景色#f60,可以看到IE6下会有橙色,请问是什么原因?
谢谢~~~

[ 本帖最后由 hellonicholas 于 2008-5-17 19:02 编辑 ]

TOP

这是因为ie6下,空层有默认高度12px,加上font-size:0;就可以

 提示:您可以先修改部分代码再运行
我爱阿仙奴!

TOP

对,谢谢~~

TOP

或者你可以在下面那个圆角的div里插入那个圆角的图片,它会自动消除那个12象素的最小高度

TOP