IE9边框颜色错误?

时间:2011-09-18 06:18:33

标签: html css html5 internet-explorer-9

其他人可以看看这段代码,并确认这是一个IE9错误或告诉我我做错了什么?使用以下HTML代码。即使定义了红色的边框颜色,按钮的下边框也将呈现与文本相同的颜色。 IE8和地球上的所有其他浏览器都可以实现这一点。确保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;

1 个答案:

答案 0 :(得分: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>

如果您接受我的意见,请不要将标记名称用作类名

相关问题