HTML and CSS Reference
In-Depth Information
FIGURE 4-22
The entire shadow of an element displayed by specifying the position to be greater then the
size of the HTML element
Another parameter for the
box-shadow
is the
inset
parameter. If omitted, this parameter
creates the shadow on the outside of the box. If
inset
is specified, the shadow is then created
on the inside of the box. This is demonstrated in the following code:
div{
position: absolute;
left: 50px;top: 50px;
width: 100px;
height: 100px;
border: solid 1px black;
box-shadow: 10px 10px inset;
}
This code produces the output shown in Figure 4-23. The shadow is now displayed on the
inside of the box instead of the outside of the box.
FIGURE 4-23
The use of the
inset
parameter to place the shadow on the inside of the box
Search WWH ::
Custom Search