Created
January 12, 2012 20:21
-
-
Save jackilyn/1602877 to your computer and use it in GitHub Desktop.
CSS Triangles
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
<style> | |
.triangle-up { | |
width: 0; | |
height: 0; | |
border-left: 5px solid transparent; | |
border-right: 5px solid transparent; | |
border-bottom: 5px solid black; | |
} | |
.triangle-down { | |
width: 0; | |
height: 0; | |
border-left: 20px solid transparent; | |
border-right: 20px solid transparent; | |
border-top: 20px solid #f00; | |
} | |
.triangle-right { | |
width: 0; | |
height: 0; | |
border-top: 60px solid transparent; | |
border-bottom: 60px solid transparent; | |
border-left: 60px solid green; | |
} | |
.triangle-left { | |
width: 0; | |
height: 0; | |
border-top: 10px solid transparent; | |
border-bottom: 10px solid transparent; | |
border-right:10px solid blue; | |
} | |
</style> | |
<div class="triangle-up"></div> | |
<div class="triangle-down"></div> | |
<div class="triangle-left"></div> | |
<div class="triangle-right"></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment