CSS - Shadow

Shadow

In this tutorial, I will be showing you how to use shadow in CSS.

There are two properties we can use to add shadow effect: text-shadow and box-shadow.

Text Shadow

  • Used to add shadow to text
  • Syntax is as follows: text-shadow: x-offset y-offset blur-radius color

Box Shadow

  • Used to add shadow to box (It can be a div or other block elements)
  • Syntax is as follows: box-shadow: x-offset y-offset blur-radius color
tips
TIP:

x-offset means position along the x-axis (horizontal)
y-offset means position along the y-axis (vertical)

note
NOTE:

You can specify multiple shadows for one text or box.


ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT