concept

Inset box shadow — CSS reference

The inset keyword places a box shadow on the inside of the padding edge. With zero blur and a positive spread it can make a sharp inner ring. It is decorative: it does not add a border to layout or change the content dimensions.

Formal Syntax & Structure

css syntaxcss
box-shadow: inset <length> <length> [<length> [<length>]] <color> (representative)

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS visual effects lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}body{background:white} #a{position:relative; margin:20px;width:80px;height:60px;background:rgb(255,0,0);box-sizing:content-box} #a{box-shadow:inset 0 0 0 6px blue}</style><body><div id="a" aria-hidden="true"></div><p>Decorative effect example.</p></body></html>
CSS Reference