Felix Kling and thirtydot suggested to use the [att=val]
attribute selector (a[rel="external"]
). But this will only work if external
is the only rel
value.
If you want to style links that could have 1 or more rel
values, you should use the [att~=val]
attribute selector:
a[rel~="external"]
(note the tilde character)
An example for such a link could be:
<a href="http://google.com" rel="external nofollow">LINK</a>
See http://www.w3.org/TR/css3-selectors/#attribute-representation for the specification.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…