Create image-less pure-CSS arrow tags - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Arrow

Description

Create image-less pure-CSS arrow tags

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">

div{<!--from   w  w w .  j  a v a2  s . c o  m-->
   padding:5px 10px;
   font-size:12px;
   -moz-border-radius:0 5px 5px 0;
   -webkit-border-radius:0 5px 5px 0;
   float:left;
   margin-left:30px;
   margin-top:20px;
   position:relative;
   font-family:verdana;
   color:#3b3d3c;
   border:1px solid #d5d5d7;
   border-left:0;
}
div{
   background: -moz-linear-gradient( top , pink 0%,black 100%);
   background: -webkit-linear-gradient( top , pink 0%,black 100%);
}
div:after{
   content:"";
   width:18px;
   height:18px;
   background: -moz-linear-gradient( left top , pink 0%,black 100%);
   background: -webkit-linear-gradient( left top , pink 0%,black 100%);
   -moz-transform: rotate(45deg);
   -webkit-transform: rotate(45deg);
   display:block;
   position:absolute;
   top:3px;
   left:-10px;
   z-index:-1;
   border:1px solid  #d5d5d7;
}
div:before{
   content:"";
   width:8px;
   height:8px;
   background:#d5d5d7;
   position:absolute;
   top:10px;
   left:-7px;
   -moz-border-radius:5px;
   -webkit-border-radius:5px;
}
div.mr:before{
   content:"x";
   width:auto;
   height:auto;
   position:absolute;
   top:5px;
   left:-5px;
   background:none;
   color:#454545;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
   div:after{
      width:16px;
      height:16px;
      top:3px;
      left:-9px;
   }
   div:before{
      top:9px;
      left:-5px;
   }
   div.mr:before{
      left:-3px;
   }
}


      </style> 
 </head> 
 <body> 
  <div>
    art 
  </div> 
  <div class="mr">
    marketing 
  </div>  
 </body>
</html>

Related Tutorials