Skip to content

Instantly share code, notes, and snippets.

@jklm313
Forked from anonymous/dabblet.css
Created June 22, 2012 13:53
Show Gist options
  • Save jklm313/2972857 to your computer and use it in GitHub Desktop.
Save jklm313/2972857 to your computer and use it in GitHub Desktop.
CSS3 ribbon (modified from Chris Coyier)
/* CSS3 ribbon (modified from Chris Coyier) */
/* a bit sloppy eh!*/
.wrapper {
margin: 50px auto;
width: 280px;
height: 370px;
background: linear-gradient (top, rgba(255,255,255,1), #d9d9d9);
border-radius: 10px;
box-shadow: 0 0 8px rgba(0,0,0,0.3);
position: relative;
}
.wrapper::before {
content: 'NEWS';
color: transparent;
text-shadow: 0 5px 0 green, 0 6px 0 rgba(255,255,255,0.5);
text-align: center;
font: bold 15px Sans-Serif;
box-sizing: border-box;
height: 0;
width: 110px;
border-bottom: 30px solid lightgreen;
border-left: 30px solid transparent;
border-right: 30px solid transparent;
transform: rotate(-45deg);
position: absolute;
left: -38px;
top: 0;
}
.wrapper::after {
content:'';
transform: rotate(-45deg);
background: green;
width: 106px;
height: 30px;
position: absolute;
left: -16px;
top: 20px;
z-index: -1;
}
<div class="wrapper"></div>
{"view":"separate","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