我知道我可以使用css来选择以特定模式开头的链接,例如
a[href^="tutorials_"] { text-color: red; }
有没有办法选择不以特定模式开头的链接,即所有不以“/ tutorials_”开头的链接。我知道有一个不是选择器,但我无法弄清楚如何将它用于此目的。
你能试一试吗:
a:not([href^="tutorials_"]) {
color: red;
}
<a href="tutorials_1">Link 1</a>
<a href="not_tutorials_1">Not link 1</a>
<a href="not_tutorials_1">Not link 1</a>