Add image Arch shape using border-radius - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Shape

Description

Add image Arch shape using 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">

.overlay {<!--from  ww w  . ja v a  2s.c  o m-->
   position: relative;
   overflow: hidden;
   width: 300px;
   height: 300px;
}
.overlay::after {
   content: "";
   position: absolute;
   width: 300%;
   height: 300%;
   top: -25%;
   left: -100%;
   background: radial-gradient(ellipse at center, rgba(255,0,0,0) 0%,rgba(255,0,0,0) 50%,rgba(255,0,0,1) 50%,rgba(255,0,0,1) 100%);
}
.overlay>img { display: block; }


      </style> 
 </head> 
 <body> 
  <div class="overlay"> 
   <img src="https://www.java2s.com/style/demo/Firefox.png"> 
  </div>  
 </body>
</html>

Related Tutorials