Created
January 13, 2016 16:00
-
-
Save dansteele/e0b647ad6ac533f4f458 to your computer and use it in GitHub Desktop.
corner_ribbon
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
.corner-ribbon{ | |
width: 200px; | |
background: #e43; | |
position: absolute; | |
top: 25px; | |
left: -50px; | |
text-align: center; | |
line-height: 2.5rem; | |
letter-spacing: 1px; | |
color: #f0f0f0; | |
transform: rotate(-45deg); | |
-webkit-transform: rotate(-45deg); | |
} | |
/* Custom styles */ | |
.corner-ribbon.sticky{ | |
position: fixed; | |
} | |
.corner-ribbon.shadow{ | |
box-shadow: 0 0 3px rgba(0,0,0,.3); | |
} | |
/* Different positions */ | |
.corner-ribbon.top-left{ | |
top: 25px; | |
left: -50px; | |
transform: rotate(-45deg); | |
-webkit-transform: rotate(-45deg); | |
} | |
.corner-ribbon.top-right{ | |
top: 25px; | |
right: -50px; | |
left: auto; | |
transform: rotate(45deg); | |
-webkit-transform: rotate(45deg); | |
} | |
.corner-ribbon.bottom-left{ | |
top: auto; | |
bottom: 25px; | |
left: -50px; | |
transform: rotate(45deg); | |
-webkit-transform: rotate(45deg); | |
} | |
.corner-ribbon.bottom-right{ | |
top: auto; | |
right: -50px; | |
bottom: 25px; | |
left: auto; | |
transform: rotate(-45deg); | |
-webkit-transform: rotate(-45deg); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment