Skip to content

Instantly share code, notes, and snippets.

@gbalbuena
Created August 5, 2013 15:26
Show Gist options
  • Save gbalbuena/6156791 to your computer and use it in GitHub Desktop.
Save gbalbuena/6156791 to your computer and use it in GitHub Desktop.
Ribbon in css
.ribbon {
text-align: center;
position: relative;
color: #fff;
margin: 0 -30px 30px -30px;
padding: 10px 0;
text-shadow: 0 1px rgba(0,0,0,.8);
background: #00AA9C;
background-image: -moz-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0));
background-image: -webkit-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0));
background-image: -o-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0));
background-image: -ms-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0));
background-image: linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0));
-moz-box-shadow: 0 2px 0 rgba(0,0,0,.3);
-webkit-box-shadow: 0 2px 0 rgba(0,0,0,.3);
box-shadow: 0 2px 0 rgba(0,0,0,.3);
}
.ribbon:before, .ribbon:after {
content: '';
position: absolute;
border-style: solid;
border-color: transparent;
bottom: -10px;
}
.ribbon:before {
border-width: 0 10px 10px 0;
border-right-color: rgb(126, 111, 0);
left: 0;
}
.ribbon:after {
border-width: 0 0 10px 10px;
border-left-color: rgb(126, 111, 0);
right: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment