Created
March 9, 2012 15:46
-
-
Save paceaux/2007175 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
.triangle{ | |
width: 0; | |
height: 0; | |
border-width: 5em; | |
border-style: solid; | |
border-color: green; | |
} | |
.triangle.side{ | |
border-top-color: transparent; | |
border-bottom-color: transparent; | |
} | |
.triangle.left{ | |
border-right:5em transparent ; | |
} | |
.triangle.right{ | |
border-left:5em transparent ; | |
} | |
.triangle.surface{ | |
border-left-color: transparent; | |
border-right-color: transparent; | |
} | |
.triangle.top{ | |
border-bottom: 5em transparent; | |
} | |
.triangle.bottom{ | |
border-top: 5em transparent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See my blog post about usage: http://blog.frankmtaylor.com/2012/04/05/snippets-class-friendly-css-triangles/