I am having the same issue as in this question, but I need to have overflow-x
set to scroll
or else the entire document will be wider than the screen. Theoretically, setting overflow-y
to visible
should keep the box shadow visible, but it still cuts it off. This can be seen with the code below.
*::-webkit-scrollbar {
display: none;
}
body {
margin: 0;
background: #ddd;
height: 100%;
width: 100%;
}
.scroll {
width: 100%;
height: 60px;
overflow-x: scroll;
overflow-y: visible;
white-space: nowrap;
}
.box {
display: inline-block;
width: 50px;
height: 50px;
margin: 5px;
background: #fff;
box-shadow: 0px 0px 50px 10px rgba(0, 0, 0, 1);
}
<div id="container">
<div class="scroll">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
</div>
I would like for the drop shadow to be fully visible outside of the parent div, is this possible at all?