Tho*_*sen 5 html css internet-explorer-9
我有一个按钮元素,我在其中应用了一个css类,它为按钮的各个边添加了边框颜色.这在以前的IE版本中有效,但在IE 9中没有
HTML:
<button class="hello-button">Hello, World</button>
CSS:
.hello-button {
border-width: 2px;
border-style: solid;
border-color: #eee #a9a9a9 #a9a9a9 #eee;
}
Run Code Online (Sandbox Code Playgroud)
这是一个已知的问题,除了边界风格之外还有其他解决方法:一开始; 我尝试了各种组合,但似乎你不能再设置按钮元素的边框样式.
编辑:格式化
如果指定3个边框,则这些边框将在IE9中呈现.指定第4个边框后,IE9拒绝渲染任何边框
作品:
.hello-button {
border-top: 2px solid #eee;
border-right: 2px solid #a9a9a9;
border-bottom: 2px solid #a9a9a9;
}
Run Code Online (Sandbox Code Playgroud)
不起作用:
.hello-button {
border-top: 2px solid #eee;
border-right: 2px solid #a9a9a9;
border-bottom: 2px solid #a9a9a9;
border-left: 2px solid #eee;
}
Run Code Online (Sandbox Code Playgroud)
除非有这种行为的有效(或至少是规范)原因,否则对我来说它看起来像个错误......