2011-09-18 207 views
2

其他人可以看看这段代码,并确认这是一个IE9的错误,或告诉我我做错了什么?使用以下HTML代码。即使定义了红色的边框颜色,该按钮的底部边框也会呈现与文本相同的颜色。 IE8和这个星球上的其他所有浏览器都可以呈现。确保IE9在标准模式下呈现。IE9边框颜色错误?

<!DOCTYPE html> 
<html> 
<head> 
<style type="text/css"> 
    button.button { 
    color: blue; 
    border: 0px; 
    border-bottom: #FF0000 2px solid; 
    } 
</style> 
</head> 
<body> 
    <button type="button" class="button">Update</button> 
</body> 
</html> 

到目前为止,我发现的唯一修复方法是为样式底部的所有边重新声明边框颜色。

border-color: #FF0000; 
+0

非常旧的,但我可以证实我也看到了这种行为,如你所说,重新宣布边框颜色似乎可以修复它。 – RYFN

回答

0

不知道它是否有助于检查出来了罚款,我

使用本

<!DOCTYPE html> 
<html> 
<head> 
<style type="text/css"> 
button { 
    border:0; 
} 

.update { 
    color: blue; 
    border-bottom: 2px #FF0000 solid; 
    display: block; 
    outline:none; 
    } 
</style> 
</head> 
<body> 
    <button type="button" class="update">Update</button> 
</body> 
</html> 

,如果你接受我的意见,不要使用标签名称为类名

+0

只是为了澄清:这是IE9中的一个错误。 border-color,border-border和border-style在border-bottom内的顺序应该没有关系。 – user123444555621

+0

@ Pumbaa80同意。此外,这个更新的例子仍然没有解决我的问题。我仍然看到边界是蓝色的; – dirkoneill