Skip to content

Instantly share code, notes, and snippets.

@ralgh
Created April 5, 2012 02:48
Show Gist options
  • Select an option

  • Save ralgh/2307621 to your computer and use it in GitHub Desktop.

Select an option

Save ralgh/2307621 to your computer and use it in GitHub Desktop.
CSS Arrow icons
/**
* CSS Arrow icons
*/
.widget {
overflow: hidden;
position:relative;
text-indent: -999em; /* hide text from view */
}
.widget:before,
.widget:after{
content: '';
display: block;
background-color:white;
position:absolute;
}
.widget:before{
height:40%;
width:40%;
top:33%;
left:28%
}
.widget:after{
height:142%;
width:142%;
top:30%;
left:-71%;
-webkit-transform:rotate(45deg);
-moz-transform:rotate(45deg);
-o-transform:rotate(45deg);
-ms-transform:rotate(45deg);
transform:rotate(45deg);
}
.small{
height: 3em;
width: 3em;
}
.medium{
height: 6em;
width: 6em;
}
.large{
height: 9em;
width: 9em;
}
.yellow{
background-color:yellow;
}
.red{
background-color:red;
}
.blue{
background-color:blue;
}
<!-- content to be placed inside <body>…</body> -->
<!--
This image in css/html
http://pokit.org/get/img/104ab0984e7479d8bbf91dc930b5e3a4.jpg
-->
<div class="widget yellow small">
A small yellow widget
</div>
<div class="widget red medium">
A medium sized red widget
</div>
<div class="widget blue large">
A big blue widget
</div>
{"view":"split","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment