Last active
August 29, 2015 14:22
-
-
Save gearmobile/0361faf2388bea0ccb30 to your computer and use it in GitHub Desktop.
CSS Triangles
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
HTML: | |
<div class="arrow-up"></div> | |
<div class="arrow-down"></div> | |
<div class="arrow-left"></div> | |
<div class="arrow-right"></div> | |
CSS: | |
.arrow-up { | |
width: 0; | |
height: 0; | |
border-left: 5px solid transparent; | |
border-right: 5px solid transparent; | |
border-bottom: 5px solid black; | |
} | |
.arrow-down { | |
width: 0; | |
height: 0; | |
border-left: 5px solid transparent; | |
border-right: 5px solid transparent; | |
border-top: 5px solid #f00; | |
} | |
.arrow-right { | |
width: 0; | |
height: 0; | |
border-top: 5px solid transparent; | |
border-bottom: 5px solid transparent; | |
border-left: 5px solid green; | |
} | |
.arrow-left { | |
width: 0; | |
height: 0; | |
border-top: 5px solid transparent; | |
border-bottom: 5px solid transparent; | |
border-right: 5px solid blue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment