Last active
January 2, 2016 18:18
-
-
Save hatefulcrawdad/8342255 to your computer and use it in GitHub Desktop.
Copy/paste from CSS Tricks for styling links based on href.
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
a[href^="http://"] { | |
/* fully valid URL, likely external link */ | |
} | |
a[href="http://google.com"] { | |
/* link to specific website */ | |
} | |
a[href^="/"], a[href^=".."] { | |
/* internal relative link */ | |
} | |
a[href^="mailto:"] { | |
/* email link */ | |
} | |
a[href$=".pdf"] { | |
/* PDF file */ | |
} | |
a[href$=".doc"] { | |
/* Microsoft Word document */ | |
} | |
a[href$=".mp3"] { | |
/* Music file */ | |
} | |
a[href$=".zip"] { | |
/* Archive file */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment