Game Development Reference
In-Depth Information
The CSS3 text shadow API allows you to specify an arbitrary number of displaced
and blurred copies of a text string.
The box shadows
Similar to text shadows, box shadows place one or more boxes behind a particular
element, with a vertical and horizontal offset specified as parameters, with a third
parameter being the amount of blur to be applied to the shadow. You can specify sol-
id colors or use the optional alpha channel in order to add varying levels of opacity
to it. Alternatively, the shadow can be applied to the inside of the container to which
it is bound. Note that any box shadow applied to elements, if they're placed behind
the box, are placed outside the border, if one is available, ignoring any margin the
element may have. Shadows placed inside an element are placed just inside the bor-
der, if one is present, ignoring any padding added to the element.
In the game, there are two instances of a CSS box shadow. One shows off the tradi-
tional shadow behind an element, and is applied to the message container. The oth-
er instance of box shadow in the game is applied to the tracks that hold each player.
Search WWH ::




Custom Search