Created
May 4, 2012 08:34
-
-
Save SirPepe/2593328 to your computer and use it in GitHub Desktop.
Selektives Markieren externer Links
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Selektives Markieren externer Links | |
*/ | |
/* Externe Links markieren... */ | |
#test1 a[target="_blank"] { | |
background: yellow; | |
} | |
/* ... und die Markierung wieder zurücksetzen */ | |
#test1 a[href^="http://www.facebook.com"]{ | |
background: none; | |
} | |
/* All-in-one-Lösung */ | |
#test2 a[target="_blank"]:not([href^="http://twitter.com"]) { | |
background: yellow; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p id="test1"> | |
<a href="http://www.facebook.com" target="_blank">Facebook</a> | |
<br> | |
<a href="http://www.peterkroener.de" target="_blank">Nicht Facebook</a> | |
</p> | |
<p id="test2"> | |
<a href="http://twitter.com" target="_blank">Twitter</a> | |
<br> | |
<a href="http://www.peterkroener.de" target="_blank">Nicht Twitter</a> | |
</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment