Skip to content

Instantly share code, notes, and snippets.

@mismith
Created January 21, 2013 23:57
Show Gist options
  • Save mismith/4590714 to your computer and use it in GitHub Desktop.
Save mismith/4590714 to your computer and use it in GitHub Desktop.
3-corner-'rounded' triangle
/* 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;
}
<div class="triangle"></div>
<!-- or -->
<div class="triangle large"></div>
// alert('Hello world!');
{"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