CSS3 shape positioning - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Shape

Description

CSS3 shape positioning

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">
.foobar {<!-- ww w .j a va  2 s.  co  m-->
   position:relative;
   width:151px;
   height:51px;
   background:Chartreuse;
   margin:auto;
}

.foobar:before {
   content:"";
   position:absolute;
   top:14px;
   left:-16px;
   width:181px;
   height:25px;
   background:yellow;
   border-radius:21px;
}
</style> 
 </head> 
 <body> 
  <div class="foobar"></div>  
 </body>
</html>

Related Tutorials