/ 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.
Works in Firefox, Safari, Chrome, Opera and IE9.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
div{ /* What makes the shadow go inside is the keyword inset at the end */ -moz-box-shadow:0 0 5px rgba(0,0,0,0.5) inset; -webkit-box-shadow:0 0 5px rgba(0,0,0,0.5) inset; box-shadow:0 0 5px rgba(0,0,0,0.5) inset; }