Compare border and box shadow - HTML CSS CSS Property

HTML CSS examples for CSS Property:box-shadow

Description

Compare border and box shadow

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <title>Thin border</title> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

.thin {<!--   w  w  w.  ja va  2s  . com-->
   border: 1px solid white;
   box-shadow: 0 1px 0 gray;
}
.box {
   box-shadow: 0 0 1px black;
}
div.normalborder {
   border: 1px solid black;
}
div {
   margin-top: 8px;
   padding: 6px;
}
span {
   color: #3D6AA2;
}


      </style> 
 </head> 
 <body> 
  <span>Normal &lt;hr&gt;:</span> 
  <hr> 
  <br> 
  <br> 
  <span>Thin &lt;hr&gt;:</span> 
  <hr class="thin"> 
  <br> 
  <br> 
  <span>Normal &lt;div&gt; with border:</span> 
  <div class="normalborder">
    lala 
  </div> 
  <br> 
  <br> 
  <span>Thin &lt;div&gt; with border:</span> 
  <div class="box thin">
    lala 
  </div>  
 </body>
</html>

Related Tutorials