Shadow inside of a div

Tim Daubenschütz picture Tim Daubenschütz · Mar 12, 2012 · Viewed 40.1k times · Source

Is it possible to display a shadow inside a div box without using pictures? Instead I want to use css commands.

So is there some command like: -webkit-box-shadow: 1px inset; ?

Answer

sandeep picture sandeep · Mar 12, 2012

Yup there is a command inset. like this:

-webkit-box-shadow: 0 0 1px 3px #000 inset;
-moz-box-shadow: 0 0 1px 3px #000 inset;
box-shadow: 0 0 1px 3px #000 inset;

You can generate from here http://css3generator.com/