Ian McNally

box-shadow for an overlay

May 21, 2015

Box shadow overlay example

Today, I used box-shadow to create an overlay!

Notice the lookahead list (bags, baby bags). It’s a <ul>.

On that <ul> I put a box-shadow:

ul {
  box-shadow: 0 0 0 100vh rgba(0, 0, 0, 0.4);
}

And it worked famously!


Ian McNally

Hey, I'm Ian. I build websites and write about what I learn as I go. Follow me on Twitter.