gpt4 book ai didi

javascript - 背景图像在 ie8 中不起作用?

转载 作者:行者123 更新时间:2023-11-28 17:59:31 25 4
gpt4 key购买 nike

我正在像这样在表格排序器中应用图像。

table.tablesorter thead tr .headerSortUp:not(.nosort) {
background-image: url('/sorter/asc.gif');
}

在所有浏览器中图像都可以工作,但 ie8 和 ie7 不工作,图像在 ie8 中不可见。请告诉我如何实现这个?

谢谢,编辑:

 table.tablesorter {
font-family:arial;
color: rgb(51, 51, 51);
margin:10px 0pt 15px;
font-size: 10pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #8dbdd8;
border: 1px solid #FFF;
font-size: 10pt;
padding: 5px;
}

table.tablesorter thead tr .header.nosort {
background-image: url('/sorter/bg.gif');
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
background-color: rgb(239, 243, 251);
padding: 5px;
border: solid 1px #e8eef4;

vertical-align: top;
}
table.tablesorter tbody tr.odd td {
background-color:#F0F0F6;
}
table.tablesorter thead tr .headerSortUp.nosort {
background-image: url('/sorter/asc.gif');
}
table.tablesorter thead tr .headerSortDown.nosort {
background-image: url('/sorter/desc.gif');
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}

最佳答案

Internet Explorer 8 不支持 :not() 选择器。这很可能是您问题的原因。如果您尝试将所有 .headerSortUp 作为目标 not.nosort 您应该将其设为默认 .headerSortUp 样式,并为那些也是 .nosort 的样式添加特殊覆盖:

table.tablesorter .headerSortUp {
// This background is removed when .nosort is present
background-image: url('/sorter/asc.gif');
}

table.tablesorter .headerSortUp.nosort {
background-image: none;
}

关于javascript - 背景图像在 ie8 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20768952/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com