1
如何以_BLANK目標爲目標但沒有特定類別的鏈接?具有不是特定類別的目標的目標元素
a[target="_BLANK"] {
// Do something if this link isn't .skip-this class
}
如何以_BLANK目標爲目標但沒有特定類別的鏈接?具有不是特定類別的目標的目標元素
a[target="_BLANK"] {
// Do something if this link isn't .skip-this class
}
只需使用CSS :not
選擇
CSS
a[target="_BLANK"]:not(.skip-this) {
color: red;
}
a[target="_BLANK"]:not(.skip-this) {
color: red;
}
<a href="" target="_BLANK" class="skip-this">Hello</a>
<a href="" target="_BLANK">Hello</a>
'a [target =「_ blank」]:not(「。skip-this」)'應該做的。 – melancia