如何定位与_BLANK目标但没有特定类别的链接?
a[target="_BLANK"] {
// Do something if this link isn't .skip-this class
}
答案 0 :(得分:3)
只需使用CSS :not
选择器
<强> CSS 强>
a[target="_BLANK"]:not(.skip-this) {
color: red;
}
a[target="_BLANK"]:not(.skip-this) {
color: red;
}
&#13;
<a href="" target="_BLANK" class="skip-this">Hello</a>
<a href="" target="_BLANK">Hello</a>
&#13;