Rendering CSS3 inset shadow with an image - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Image Shadow

Description

Rendering CSS3 inset shadow with an image

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">
.teaserimage {<!-- www .  j ava  2  s.co  m-->
   position:relative;
   float:left;
}

.teaserimage img {
   vertical-align:middle;
}

.teaserimage .shadow {
   -webkit-box-shadow:inset 11px 11px 11px 0px Chartreuse;
   -moz-box-shadow:inset 11px 11px 11px 0px yellow;
   box-shadow:inset 11px 11px 11px 0px blue;
   position:absolute;
   top:0px;
   width:100%;
   height:100%;
}
</style> 
 </head> 
 <body> 
  <div class="teaserimage"> 
   <img src="https://www.java2s.com/style/demo/Opera.png"> 
   <div class="shadow"></div> 
  </div>  
 </body>
</html>

Related Tutorials