Skip to content

Instantly share code, notes, and snippets.

@mkormendy
Created August 11, 2014 20:54
Show Gist options
  • Save mkormendy/ce45253e76a95751a293 to your computer and use it in GitHub Desktop.
Save mkormendy/ce45253e76a95751a293 to your computer and use it in GitHub Desktop.
A Pen by Mike Kormendy.
<div id="chevron"></div>
#chevron {
position: relative;
top: 100px;
text-align: center;
padding: 12px;
margin-bottom: 6px;
height: 60px;
width: 200px;
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
#chevron:before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 50%;
background: #e21a23;
-webkit-transform: skew(0deg, 38.66deg);
-moz-transform: skew(0deg, 38.66deg);
-ms-transform: skew(0deg, 38.66deg);
-o-transform: skew(0deg, 38.66deg);
transform: skew(0deg, 38.66deg);
}
#chevron:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 100%;
width: 50%;
background: #e21a23;
-webkit-transform: skew(0deg, -38.66deg);
-moz-transform: skew(0deg, -38.66deg);
-ms-transform: skew(0deg, -38.66deg);
-o-transform: skew(0deg, -38.66deg);
transform: skew(0deg, -38.66deg);
}​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment