Over the past couple of weeks, I've had several other NCs ask me about CSS3 Box shadows, so i figured I'd give you all a few pointers I've learned over the past couple of years.
Take a look at this example:
box-shadow: 3px 3px 10px 5px #000;
- A positive value for the horizontal offset draws a shadow that is offset to the right of the box, a negative length to the left.
- The second length is the vertical offset. A positive value for the vertical offset basically offsets the shadow down, a negative one up.
- You’re not allowed to use negative values for blur radius. The larger
the value, the more the shadow’s edge is blurred, as it can be seen above.
- Spread distance positive values cause the shadow shape to expand in all directions by the specified radius.
- Negative ones cause the shadow shape to contract.
- The color is the color of the shadow.
- The inset keyword (missing above), if present,changes the drop shadow from an outer shadow to an inner shadow
There are tons of Box Shadow Generators out there to help you with getting your box shadow just right, but i thought it might be helpful to understand the values being used.