Html Css how to make shadow on overlay

Viewed 53

i want to make a shadow on overlay of div like the shadow in the photo photo

my code:

.nav-open {
    height: 350px;
    width: 100%;
    background-color: #ffffff;
    position: absolute;
    z-index: 1;
    border: 1px solid #aaaaaa;
    border-left: 0;
    border-right: 0;
}
<div class="nav-open"></div>

output: enter image description here

1 Answers

Use filter: brightness(50%). Everything in the div will be darkened.

Example with filter: brightness(50%):

enter image description here

Example with filter: brightness(150%):

enter image description here

Related