我在 IE8 中设置提交和取消按钮的样式时遇到问题。
使用:
.editableTable button[type="submit"]
{
background:url("../images/Ok-icon.png") no-repeat 0 0;
border:none;
}
和
.editableTable button[type="cancel"],.editableTable button[type="button"]
{
background:url("../images/Close-icon.png") no-repeat 0 0;
border:none;
}
我在 FF 和 IE7 中得到了我想要的,但在 IE8 中,按钮类型在确定和取消按钮上都是提交的,所以我在两个按钮上都得到了确定图标。我的另一个选择是 button:nth-child() 但这在 IE 中不起作用。所以我被困住了,真的很感激任何指点......
谢谢!
问候斯文
最佳答案
您可能缺少 Doctype
声明。尝试添加 <!doctype html>
在页面顶部 <html>
之前开始看看会发生什么。还有一个 IE 有时不理解的怪癖 type="submit"
但理解type="Submit"
反之亦然。也试试这些。
除此之外,类似的问题已在 SO 上被问过几次。
其中一个在这里 Css attribute selector for input type="button" not working on IE7
--编辑
哦。还发现了有关 IE8 中选择器问题的问题。 Attribute selectors, JavaScript and IE8
关于css - Jeditable 按钮样式问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4880448/