CSS3 transform to create ribbon - HTML CSS CSS Animation

HTML CSS examples for CSS Animation:Transform

Description

CSS3 transform to create ribbon

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
header {<!--from   w w w  .j  a va 2 s . c  o m-->
   position:relative;
   background:Chartreuse;
   padding:9px 11px;
   color:yellow;
   font-size:21px;
}

header:before {
   z-index:-2;
   position:absolute;
   width:15px;
   height:15px;
   background:blue;
   content:'';
   left:4px;
   bottom:-8px;
   -webkit-transform:skewX(46deg) rotate(46deg);
   -moz-transform:skewX(46deg) rotate(46deg);
   -o-transform:skewX(46deg) rotate(46deg);
   -ms-transform:skewX(46deg) rotate(46deg);
   transform:skewX(46deg) rotate(46deg);
}
</style> 
 </head> 
 <body> 
  <header>
    Lorem ipsum do 
  </header>  
 </body>
</html>

Related Tutorials