Skip to content

Instantly share code, notes, and snippets.

@EvanLovely
Created October 12, 2012 22:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EvanLovely/3881853 to your computer and use it in GitHub Desktop.
Save EvanLovely/3881853 to your computer and use it in GitHub Desktop.
Awesome CSS Triangle
/**
* Awesome CSS Triangle
*/
.triangle {
width: 0;
height: 0;
border-width: 10px 10px 10px 19px;
border-style: solid;
border-color: transparent transparent transparent blue;
position: absolute;
clip: rect(0px 15px 26px 8px);
}
<h1>Awesome CSS Triangle</h1>
<p>Taking a <a href="http://css-tricks.com/snippets/css/css-triangle/">good way to make CSS triangles</a> and then utilizing the <code>clip</code> property, and tweaking the border widths to give it a unique shape.
<div class='triangle'></div>
{"view":"separate","fontsize":"90","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment