Created
January 21, 2013 23:57
-
-
Save mismith/4590714 to your computer and use it in GitHub Desktop.
3-corner-'rounded' triangle
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
/* 3-corner-'rounded' triangle */ | |
.triangle { | |
font-size: 10px; | |
position: relative; | |
width: 6em; | |
height: 6em; | |
text-align: center; | |
overflow: hidden; | |
border-radius: 100%; | |
margin: 10% auto 0; | |
} | |
.triangle:before { | |
content: ''; | |
position: absolute; | |
border: solid 3em transparent; | |
border-bottom-color: orange; | |
border-bottom-width: 5em; | |
border-top-width: 0; | |
margin: -.414em -50%; | |
} | |
.triangle:hover { overflow: visible; } | |
.triangle.large { | |
font-size: 4em; | |
margin-top: 1em; | |
} | |
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
<div class="triangle"></div> | |
<!-- or --> | |
<div class="triangle large"></div> |
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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment