Skip to content
Justice Tech School

Box Shadow

box-shadow takes x offset, y offset, blur, spread and colour. inset puts the shadow inside. Several shadows can be layered with commas.

Example
<style>
.s { padding: 14px; background: #1e293b; border-radius: 8px; box-shadow: 0 6px 16px rgba(0,0,0,.5), 0 0 0 2px #14b8a6 }
</style>
<div class="s">Layered shadow</div>

Exercise

Shadow inside the box.

box-shadow:  0 0 8px black;

Quiz Test

What are the first two shadow values?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.