<?xml version="1.0" encoding="utf-8"?>

CSS box-shadow property with the color value

CSS box-shadow property with the color value Bad Practice
CSS box-shadow property with the color value Best Practice

The color value is optional when specifying shadow parameters with the box-shadow property. However, if you omit this value, the browser will use the text color (color property value) for your shadows.

To specify the color value, you can use multiple options:

  • HEX colors
  • RGB/RGBA colors
  • HSL/HSLA colors
  • Predefined color names

Topics

From Lesson

Share

Improve your UX & Product skills with interactive courses that actually work