Stacking traffic light shapes - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Shape

Description

Stacking traffic light shapes

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">
.container {<!--from ww  w .ja v  a 2  s .  co  m-->
   background:none repeat scroll 0 0 Chartreuse;
   height:100px;
   padding:11px;
   width:31px;
}

.red, .yellow, .green {
   border-radius:100%;
   height:26px;
   margin-top:4px;
   padding:3px;
   width:26px;
}

.red {
   background:red;
}

.yellow {
   background:yellow;
}

.green {
   background:green;
}
</style> 
 </head> 
 <body> 
  <div class="container"> 
   <div class="red"></div> 
   <div class="yellow"></div> 
   <div class="green"></div> 
  </div>  
 </body>
</html>

Related Tutorials