CSS - Box Shadow

Boxdim

CSS - Box Shadow

About

shadow on a box is created via the box-shadow property that attaches one or more drop-shadows to the box.

Example

<div class="shadowedBorderBox"></div>
  • The css applied to the class shadowedBorderBox
.shadowedBorderBox {
    /* the box shadow */
    box-shadow: 5px 5px 5px #666;
    /* a border to see the box */
    border: 1px solid blue; 
    /* width and height because has no intrinsic width and height */
    width: 60px; 
    height: 60px; 
}
  • The result:

Documentation / Reference





Discover More
Boxdim
CSS - Boxes (Box Model)

CSS The Box model means that each element is represented as a rectangular box. The layout phase of the browser rendering engine creates the box model as a tree of box and determines: the , the...



Share this page:
Follow us:
Task Runner