.popup {
position: relative;
width: 100%;
height: 100vh;
&::before {
display: block;
position: absolute;
content: '';
background: linear-gradient(0deg, #FFFFFF 9.15%, rgba(255, 255, 255, 0) 100%);
width: 100%;
height: 200px;
right: 0;
bottom: 0;
}
}
const popup = document.querySelector('.popup');
const pseudoElement = popup.querySelector('::before');
popup.addEventListener('scroll', function() {
if (popup.scrollHeight - popup.scrollTop === popup.clientHeight) {
pseudoElement.style.display = 'none';
} else {
pseudoElement.style.display = 'block';
}
});