IE9输入/按钮元素边框颜色问题 [英] IE9 input/button element border color issue
问题描述
在我正在建立的网站中,我无法获得< input>
和< button> code>元素。我想让顶部,左边和右边框是相同的颜色,然后让底部边框有不同的颜色。我可以得到的样式为任何其他元素工作,除了那两个,这个问题只存在于IE9。非常感谢任何帮助或解释。
In the site I am currently building I am having trouble getting my border colors right for <input>
and <button>
elements. I would like to have the top, left, and right borders to be the same color and then have the bottom border a different color. I can get the styling to work for any other element to work except for those two, and this issue only exist in IE9. Any help or explanation would be greatly appreciated.
我的问题的例子: http://jsfiddle.net/NyG3x/24/
推荐答案
尝试分开设置边框。
border: 1px solid #000;
border-bottom: 5px solid #CE181E
这在IE9中出现了一个错误。如果您将底部边框设置为1px,则红色边框显示为正确显示。但是,如果将值设置为大于1px的任何值,它似乎将 border-color
恢复为另一个 border-color
。
This appears a bug in IE9. If you set the bottom border to 1px, the red border appears to show correctly. However, if you set the value to anything more than 1px, it seems to revert the border-color
to the value of the other border-color
.
UPDATE
要从按钮
中删除样式,请将按钮
的内部文本包装在 div
并设置 div
的样式。这在IE9中可以使用,如此处所示。
A simple solution would be to remove the styling from the button
, wrap the inner text of the button
inside a div
and style the div
. This works in IE9 as shown here.
这篇关于IE9输入/按钮元素边框颜色问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!