Created
February 22, 2012 18:03
-
-
Save JosephSilber/1886343 to your computer and use it in GitHub Desktop.
CSS diamond without transforms
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
/* CSS diamond without transforms */ | |
#diamond { | |
width: 0; | |
height: 0; | |
border: 50px solid transparent; | |
border-bottom-color: red; | |
position: relative; | |
} | |
#diamond:after { | |
content: ' '; | |
position: absolute; | |
left: -50px; top: 50px; | |
width: 0; | |
height: 0; | |
border: 50px solid transparent; | |
border-top-color: red; | |
} |
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
<p id="diamond"></p> |
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
{"view":"split-vertical","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment