Created
February 23, 2012 00:52
-
-
Save JosephSilber/1888825 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: 70px solid red; | |
position: relative; | |
} | |
#diamond:after { | |
content: ' '; | |
position: absolute; | |
left: -50px; top: 70px; | |
width: 0; | |
height: 0; | |
border: 50px solid transparent; | |
border-top: 70px solid 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