CSS Shadows - Detailed Overview

Introduction to Shadows

CSS shadows add depth and dimension to elements by creating visual effects of shadows. There are two main types of shadows:

Box Shadow

The box-shadow property allows you to add shadows to elements. You can control the horizontal and vertical offset, blur radius, spread radius, and color.

box-shadow: offset-x offset-y blur-radius spread-radius color;

Box Shadow Examples

Shadow Example 1
Shadow Example 2 (Inset)
Shadow Example 3 (Outset)
Shadow Example 4 (Large)
Shadow Example 5 (Colored)

Text Shadow

The text-shadow property applies shadow to text, allowing you to create depth and enhance readability.

text-shadow: offset-x offset-y blur-radius color;

Text Shadow Example

This text has a shadow effect.