Less: CSS3 Ribbon
@size: 150px;
@ribbon-width: 210px;
@ribbon-height: 28px;
@offset: 13px;
@ribbon-left: (@size - @ribbon-width) / 2 + @offset;
@ribbon-top: (@size - @ribbon-height) / 2 - @offset;
.ribbon {
width: @size;
height: @size;
display: block;
position: fixed;
right: 80px;
overflow:hidden;
background: #ccc;
&:after {
content: attr(data-label);
width: @ribbon-width;
height: @ribbon-height;
line-height: @ribbon-height;
text-align: center;
position: absolute;
top: @ribbon-top;
left: @ribbon-left;
font-family: arial;
font-size: 14px;
font-weight: bold;
-webkit-transform: rotate(45deg);
box-shadow: 0px 0px 5px 1px #888888;
background-color: orange;
}
}