Created
May 24, 2013 20:46
-
-
Save trumball/5646403 to your computer and use it in GitHub Desktop.
Github Fork Ribbon
As a big user on Github this basic code snippet blew my mind. You can quickly generate Github corner ribbons in your webpage using CSS3 transform properties. This is perfect for open source plugins or code packs which have a popular following on Github. Also great for hosted HTML/CSS/JS demos if you have an active Github repo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.ribbon { | |
background-color: #a00; | |
overflow: hidden; | |
/* top left corner */ | |
position: absolute; | |
left: -3em; | |
top: 2.5em; | |
/* 45 deg ccw rotation */ | |
-moz-transform: rotate(-45deg); | |
-webkit-transform: rotate(-45deg); | |
/* shadow */ | |
-moz-box-shadow: 0 0 1em #888; | |
-webkit-box-shadow: 0 0 1em #888; | |
} | |
.ribbon a { | |
border: 1px solid #faa; | |
color: #fff; | |
display: block; | |
font: bold 81.25% 'Helvetiva Neue', Helvetica, Arial, sans-serif; | |
margin: 0.05em 0 0.075em 0; | |
padding: 0.5em 3.5em; | |
text-align: center; | |
text-decoration: none; | |
/* shadow */ | |
text-shadow: 0 0 0.5em #444; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment