<div id="scroll-container">
<div id="content">
<!-- Контент -->
</div>
</div>
<script>
const scrollContainer = document.getElementById('scroll-container');
scrollContainer.addEventListener('scroll', () => {
const scrolledPixels = scrollContainer.scrollTop;
console.log(`Проскролил вниз на: ${scrolledPixels} пикселей`);
});
</script>