Created
July 26, 2012 10:23
-
-
Save flexbox/3181381 to your computer and use it in GitHub Desktop.
CSS3 : Style des liens en fonction des types de fichiers
This file contains 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
/* Liens externes */ | |
a[rel="external"]{ | |
font-size:16px; | |
} | |
/* Liens Email | |
Le selecteur ^= permet de cibler tous les liens commençant par mailto: | |
:before ajoute une entite sous forme d'icone | |
*/ | |
a[href^="mailto:"]:before{ | |
padding-left:5px; | |
content:'✉'; | |
} | |
/* Fichiers PDF */ | |
a[href$=".pdf"]{ | |
padding-right: 20px; | |
background: url(pdf.png) no-repeat center right; | |
} | |
/* Fichiers ZIP */ | |
a[href$=".zip"]{ | |
font-size:16px; | |
} | |
a[href$=".zip"]:after{ | |
content: url(icons/zip.png); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment