CSS Intro

CSS Intro Quiz

CSS Intro Exercise

CSS Basic

CSS Basic Quiz

CSS Basic Exercise

CSS Advance

CSS Advance Quiz

CSS Advance Exercise


CSS3 Quiz

CSS3 Exercise

CSS Properties

CSS Functions

CSS Selectors

Box Shadow in CSS

The box-shadow Property



The CSS3 box-shadow property applies shadow to elements. It has a total of five components.


Five Components of box-shadow are:-


  • Horizontal Offset i.e, it will cast a shadow to the right if the value is positive and left if the value is negative.
  • Vertical Offset i.e, it will cast a shadow down if the value is positive and up if the value is positive.
  • Blur Radius i.e, it will blur the shadow
  • Spread i.e, it will spread the shadow
  • Color i.e, it will select the color of the shadow




Its syntax is:-

< style >


box-shadow: none| h-offset v-offset blur spread color | inset| initial| inherit;


< /style >


Further Explanation:-


Value Description
none No shadow is displayed
h-offset Required. The horizontal offset of the shadow.
v-offset Required. The vertical offset of the shadow.
blur Optional. The blur radius.
spread Optional. The spread radius.
color Optional. The color of the shadow.
inset Optional. Changes the shadow from an outer shadow (outset) to an inner shadow
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Code Explanation

All Tutorials related to CSS3

All Sections related to CSS