Advantages Using CSS Ribbons:
 
  
  
 
  
  
     
       
  
  
  
   
  
 
       
       
  
  
- No images, no extra HTTP requests
 - Flexibility
 - Easy to update: color, size, etc
 - Spice up the ribbons with CSS3 and you’ll love them ;)
 
Examples:
.fullRibbon{
   text-align: center;
   position: relative;
   color: #fff;    
   margin: 0 @negativeSpace @positiveSpace @negativeSpace;
   padding: 10px 0; 
   text-shadow: 0 1px rgba(0,0,0,.8);
   background: @ribbonBackground;
   background-image: -moz-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0));  //Firefox 
   background-image: -webkit-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0)); //Chrome
   background-image: -o-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0)); //Opera
   background-image: -ms-linear-gradient(rgba(255,255,255,.3), rgba(255,255,255,0)); //Internet Explorer
   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);
 }
 .fullRibbon:before
    {
        content: '';
        position: absolute;
  border-style: solid;
        border-color: transparent;
        bottom: -15px;
  border-width: 0 15px 15px 0;
        border-right-color: @fullRibbonFoldColor;
        left: 0;
    }
 .fullRibbon:after
    {
        content: '';
        position: absolute;
  border-style: solid;
        border-color: transparent;
        bottom: -15px;
  border-width: 0 0 15px 15px;
        border-left-color: @fullRibbonFoldColor;
        right: 0;
    }  
//Left Ribbon    
    .leftRibbon
    {  
  text-align: center;
  position: relative;
  color: #fff;    
  margin: 0 0 @positiveSpace @negativeSpace;
  padding: 0; 
  text-shadow: 0 1px rgba(0,0,0,.8);
  background: #EB4216;
  margin: 0 -30px 30px -26px;
        padding: 0px; 
        background-image: -moz-linear-gradient(bottom,rgba(255,255,255,0), #fff);
        background-image: -webkit-linear-gradient(bottom,rgba(255,255,255,0), #fff);
  background-image: -o-linear-gradient(bottom,rgba(255,255,255,0), #fff);
  background-image: -ms-linear-gradient(bottom,rgba(255,255,255,0), #fff);
        background-image: linear-gradient(bottom,rgba(255,255,255,0), #fff);
    }
    .leftRibbon:before
    {
        content: '';
        position: absolute;
  border-style: solid;
        border-color: transparent;
        bottom: -15px;
  border-width: 0 15px 16px 0;
        border-right-color: #EB4216;
        left: 0;
    }
 //Right Ribbon
 .channelContainer{ 
  margin-left:0px;
 }
    .rightRibbon
    {
  position: relative;
  color: #fff;    
  margin: 0 0 @positiveSpace @negativeSpace;
  padding: 0; 
  text-shadow: 0 1px rgba(0,0,0,.8);
  background: #E752D0;
  margin-right:20px;
  text-align: right; 
        margin: 0px -30px 10px 0;
        padding: 0px; 
        background-image: -moz-linear-gradient(bottom,rgba(255,255,255,0),#fff);
        background-image: -webkit-linear-gradient(bottom,rgba(255,255,255,0),#fff);
  background-image: -o-linear-gradient(bottom,rgba(255,255,255,0),#fff);
  background-image: -ms-linear-gradient(bottom,rgba(255,255,255,0),#fff);
        background-image: linear-gradient(bottom,rgba(255,255,255,0),#fff);
    }    
    .rightRibbon:after
    {
         content: '';
        position: absolute;
  border-style: solid;
        border-color: transparent;
        bottom: -14px;
  border-width: 0 0 15px 15px;
        border-left-color: #E752D0;
        right: 0;
    } 

No comments:
Post a Comment