我不确定该如何措辞,但基本上是在IE9中,将标准和浏览器模式设置为IE9时,我的按钮样式无法正确呈现。无论是否与IE10兼容,它们在IE9标准和浏览器模式下看起来都不错,因此在IE10中进行测试不会显示此错误。在chrome中,它也可以很好地工作。这是我的按钮输入代码和.css以及显示按钮渲染效果的小提琴。我附上了以chrome呈现的按钮的屏幕截图(正确),因此您可以看到它的外观,但我不确定是否可以解决此问题,并希望有人可以提供帮助。
.button_standard,
.CommandButton,
.CommandButtonNoWidth,
.CommandButtonWorkflow,
.CommandButtonWorkflowNotify
{
border-top: #F4E6CC 2px solid;
border-right: #BFB087 2px solid;
border-bottom: #ABA476 2px solid;
border-left: #F5DFBA 2px solid;
padding: 0;
font-weight: bold;
font-size: 8pt;
margin: 0;
color: #666666;
background-color: #F3D29D;
text-decoartion: none;
cursor:pointer;
}
<input type="submit" name="ucDocSearchForm$btnSearch" value="Search" onclick="return validateDates();" id="ucDocSearchForm_btnSearch" class="CommandButtonNoWidth" name="btnSearch" onMouseOver="this.src='/applications/images/search_over_clink.gif'" onMouseOut="this.src='/applications/images/search_on_clink.gif'" style="font-weight:bold;width:65px" />
Your problem appears to be the order of the declarations in the border
styles.
CSS border
(and border-left
, etc) are specified as a concatenation of border-width
, border-style
, and border-color
, in that order.
You've got them in a completely different order.
Theoretically, getting them in the wrong order can break things. In practice, I've not seen it actually happen very often; browsers are generally pretty good at working out what you mean in this case as the three values are easily distinguished (some other styles are more demanding in this respect, but border
is generally less so).
However, discussions about theory and practice go out of the window here, because switching the values into the right order in your code makes it work as intended, so clearly that is the issue.
这是更新的小提琴:http : //jsfiddle.net/LLHeD/2/
希望能有所帮助。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句