Add a page top shadow with CSS

A ver cool CSS snippet that creates a top shadow at the very top of your site.

Simple and elegant 😉

body:before {
	content: "";
	position: fixed;
	top: -10px;
	left: -10px;
	width: 110%;
	height: 10px; 
	z-index: 100;

	box-shadow: 0px 0px 10px rgba(0,0,0,.8); 

About Ricard Torres

Senior Front-end Software Engineer from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

@ricard_dev @ricard_dev

📝 Blog 🎙 Podcast

Leave a Reply

Add <code> Some Code </code> by using this tags.