CSS Trick: Overlay with Box-Shadow

By Jason FarrellBret Morris on
Edited by Ryan Daniels

The key is to use box-shadow and set a super large spread so that it covers even the largest viewports. I added on a CSS transition as well in case you wanted to animate the opacity of the overlay (a neat little effect).

Check out the demo

Browser support: IE9+, Safari, Chrome, Firefox

hand drawing