Posted By

visudex on 11/18/10


Tagged

box CSS3 inner shadow


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

baczoni


Inner Shadow with CSS3


 / Published in: CSS
 

Use the regular box shadow, but add the keyword "inset" as the last parameter. Works in Firefox, Safari, Chrome, Opera and IE9.

  1. div{
  2. /* What makes the shadow go inside is the keyword inset at the end */
  3. -moz-box-shadow:0 0 5px rgba(0,0,0,0.5) inset;
  4. -webkit-box-shadow:0 0 5px rgba(0,0,0,0.5) inset;
  5. box-shadow:0 0 5px rgba(0,0,0,0.5) inset;
  6. }

Report this snippet  

You need to login to post a comment.