Box shadows allow you to create a box-shaped shadow around the outside or inside of the element it is applied to. Once text shadows are understood, box shadows are a piece of cake; principally, they follow the same syntax: horizontal offset, vertical offset, blur, spread (we will get to spread in a moment), and color.
Only two of the possible four length values are required (in the absence of the last two, the value of color defines the shadow color and a value of zero is used for the blur radius). Let's look at a simple example:
.shadow {
box-shadow: 0px 3px 5px #444;
}The default box-shadow is set on the outside of the element. Another optional keyword, inset allows the box-shadow to be applied inside the element.
The box-shadow property can also be used to create an inset shadow. The syntax is identical to a normal box shadow except that the value starts with the keyword inset:
.inset {
box-shadow: inset 0 0 40px #000;
}Everything functions as before but the inset part of the declaration instructs the browser to set the effect on the inside. If you look at example_06-01 you'll see an example of each type:

Like text-shadow, you can apply multiple box-shadow. Separate the box-shadow with a comma and they are applied bottom to top (last to first) as they are listed. Remind yourself of the order by thinking that the declaration nearest to the top in the rule (in the code) appears nearest to the 'top' of the order when displayed in the browser. As with text-shadow, you may find it useful to use whitespace to visually stack the different box-shadow:
box-shadow: inset 0 0 30px hsl(0, 0%, 0%),
inset 0 0 70px hsla(0, 97%, 53%, 1);I'll be honest, for literally years I didn't truly understand what the spread value of a box-shadow actually did. I don't think the name 'spread' is useful. Think of it more as an offset. Let me explain.
Look at the box on the left in example_06-02. This has a standard box-shadow applied. The one on the right has a negative spread value applied. It's set with the fourth value. Here is the relevant code:
.no-spread {
box-shadow: 0 10px 10px;
}
.spread {
box-shadow: 0 10px 10px -10px;
}Here is the effect of each (element with spread value on the right):

The spread value lets you extend or contract the shadow in all directions by the amount specified. In this example, a negative value is pulling the shadow back in all directions. The result being that we see the shadow at the bottom, only instead of seeing the blur 'leak' out on all sides (as the blur is being counter-balanced by the negative spread value).
You can read the W3C specification for the box-shadow property at http://www.w3.org/TR/css3-background/.