Skip to content

Instantly share code, notes, and snippets.

@p-hennessy
Created February 10, 2014 08:54
Show Gist options
  • Save p-hennessy/8912546 to your computer and use it in GitHub Desktop.
Save p-hennessy/8912546 to your computer and use it in GitHub Desktop.
Ribbon style h1 that will look liek its wrapped around the page parent element. Uses psudo classes to achieve this. Makes for pure markup and no extra
h1{
background:-moz-linear-gradient(top, #f0f0f0 0%, #d4d4d4 100%);
font-family:Helvetica;
color:#303030;
text-shadow:0 1px 0 white;
width:300px;
margin-top:20px;
margin-left:-20px;
position:relative;
text-align:left;
padding-left:20px;
}
/* After for the box shadow, gives the real 3d effect
Is placed on top of the regular element, transparent and given a box shadow
*/
h1::after{
content:'';
height:100%;
width:100%;
position:absolute;
background:transparent;
z-index:100;
top:0;
left:0;
box-shadow:0 0 5px rgba(0,0,0,1);
}
/* This generates the left side arrow thing */
h1::before{
height:0px;
width:0px;
border-top:10px solid #aaa;
border-left:20px solid transparent;
content:'';
position:absolute;
top:100%;
left:0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment