Create Inverted border with border-radius - HTML CSS CSS Property

HTML CSS examples for CSS Property:border-radius

Description

Create Inverted border with border-radius

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

#main {<!--from  w ww . j a v  a  2s.c om-->
   margin: 40px;
   height: 100px;
   background-color: #004C80;
   position: relative;
   overflow: hidden;
}
#main div {
   position: absolute;
   width: 20px;
   height: 20px;
   border-radius: 100%;
   background-color: #FFF;
}
.top { top: -10px; }
.bottom { bottom: -10px; }
.left { left: -10px; }
.right { right: -10px; }


      </style> 
 </head> 
 <body> 
  <div id="main"> 
   <div class="top left"></div> 
   <div class="top right"></div> 
   <div class="bottom left"></div> 
   <div class="bottom right"></div> 
  </div>  
 </body>
</html>

Related Tutorials