-1
Maybe what you’re looking for is the box-shadow
with the option inset
.
Behold:
.caixa{
height: 150px;
background-color: orange;
margin: 10px 0;
}
.sombra{
box-shadow: 0 -45px 45px red inset;
}
<div class="caixa"></div>
<div class="caixa sombra"></div>
Usually, the box-shadow
positions the shadow outside the element, but with the option inset
the shadow becomes internal.
This example is not very clear. You want the shadow to be inside the div, from top to bottom?
– Phiter
"above" or "above" the DIV?
– Guilherme Nascimento