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

CSS box-shadow property with the offset values

CSS box-shadow property with the offset values Bad Practice
CSS box-shadow property with the offset values Best Practice

Horizontal and vertical offset values of the box-shadow property specify the position of a shadow and can be both positive and negative.

  • The horizontal offset — the x-axis value — can be positive, and the shadow will be on the right of the box. A negative offset value puts the shadow on the left of the box.
  • The vertical offset — the y-axis value — can be positive, and the shadow will be below the box. A negative value sets the shadow above the box.

Topics

From Lesson

Share

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