Created
February 23, 2012 00:48
-
-
Save JosephSilber/1888796 to your computer and use it in GitHub Desktop.
CSS diamond with flat top
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 with flat top */ | |
#diamond { | |
width: 0; | |
height: 0; | |
border: 50px solid transparent; | |
border-bottom: 20px solid red; | |
position: relative; | |
} | |
#diamond:after { | |
content: ' '; | |
position: absolute; | |
left: -50px; top: 20px; | |
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