Loading...

CSS Shadows

CSS TransformationsCSS Filters

CSS shadows add visual depth to elements. The box-shadow property applies to boxes, while text-shadow applies to text. These can be used to highlight content and create stylish designs.

Simple box-shadow example

In the following example, we add a shadow to a box that is offset to the right and downward with a slight blur. The shadow color is semi-transparent black.

The example shows the basic usage of the box-shadow property.

Box-shadow syntax

Box-shadow consists of several parameters: horizontal offset, vertical offset, blur, spread, and color. By combining these, different effects can be achieved.

ParameterDescription
h-offsetThe horizontal offset of the shadow.
v-offsetThe vertical offset of the shadow.
blur-radiusThe blur radius of the shadow.
spread-radiusThe spread radius of the shadow.
colorThe color of the shadow.

Tips for using shadows

Use shadows carefully so they create a natural effect and do not harm readability.

  • Use subtle shadows for a natural look.
  • Combine multiple shadows on one element for a deeper effect.
  • Do not overuse shadows, as they can reduce the clarity of the design.

✨ Ask Lara

Please sign in to ask Lara about CSS Shadows.

Track Your Progress 🚀

Learn more easily by tracking your progress completely for free.


Top tools

CodeHubBoardly NEWLinksy NEWChromo NEW

Select Language

Set theme

© 2025 ReadyTools. All rights reserved.