How to create an inner shadow using CSS

Share

An inner shadow can be created using the box-shadow property, which allows different types of shadows to be added to an element.

Syntax

box-shadow: none|h-offset v-offset blur spread color |inset;
value description
none It sets the default value with no shadow.
h-offset Its value is compulsory for the horizontal shadow effect.
v-offset Its value is compulsory for the vertical shadow effect.
blur It sets the radius value for the blur effect.
spread It sets the radius value for the spread effect.
color It sets the color for the shadow effect.
inset This property changes the outer shadow to the inner shadow.

Implementation

Copyright ©2024 Educative, Inc. All rights reserved