Custom Top and Bottom CSS Container Masks
Briefly

It was really a TIL for me that mask-image supported multiple image definitions, similar to background, and that was exactly what I needed to formulate an idea for this CSS trick.
One thing to note is that if you're dealing with full-width containers for this effect, you can use vw units in your calculations.
Read at Andrewwalpole
[
]
[
|
]