I'm trying to achieve gradual text fading effect at the bottom of the scrollable block. Also there must be an image behind this block so simply placing color (opacity) gradient over this block won't do and mix-blend-mode
must be used.
The block has the following structure:
<div id="stage"><img ...></div>
<div class="layer">
<h2>...</h2>
<div class="text">
<div class="scroll-box">
<div class="container">...</div>
::after
</div>
<div class="scroll-tools">...</div>
</div>
</div>
.container
contains some text. .scroll-tools
contain custom scrollbar elements (rail and thumb). Here's jsfiddle.
Almost everything there looks as it should. Except scrollbar's rail is invisible due to it being black and mix-blend-mode: screen
being applied to .layer
and scrollbar's thumb has wrong color.
To exclude scrollbar from being blended I tried applying mix-blend-mode
to .scroll-box
but for some reason this does not work.
Question1: Is it possible to achieve the same effect with text in my case without affecting scrollbar? How?
Question2: Why mix-blend-mode
doesn't work when being applied to .scroll-box
(or .text
)?