Create oval shape - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Shape

Description

Create oval shape

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">
#wave {<!-- w w w .jav  a2  s .  c o m-->
   position:relative;
   height:71px;
   width:601px;
   background:Chartreuse;
}

#wave:before {
   content:"";
   display:block;
   position:absolute;
   border-radius:100% 51%;
   width:341px;
   height:81px;
   background-color:yellow;
   right:-6px;
   top:41px;
}

#wave:after {
   content:"";
   display:block;
   position:absolute;
   border-radius:100% 51%;
   width:301px;
   height:71px;
   background-color:blue;
   left:0;
   top:28px;
}
</style> 
 </head> 
 <body> 
  <div id="wave"></div> 
  <div></div>  
 </body>
</html>

Related Tutorials