我正试图在userstyle的YouTube中使用<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<ul>
<li>Item 1
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li class="close">
close
</li>
</ul>
</li>
<li>Item 2
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</li>
<li>Item 3</li>
</ul>
,但无效:
a:visited img
另一方面,如果我改用a:visited img {
filter: grayscale(100%) !important;
}
和a:visited
,它们可以正常工作:
a img
a:visited {
color: red !important;
}
a img {
filter: grayscale(100%) !important;
}
为什么不起作用?