How can I sync scrolling in Windows with the scrolling of a div content, such as on WordPress editor pages?
Let's say I have the following elements:
- Header
- Article
- Footer
The div content has the following style:
.my-div {
overflow-y: auto;
height: 576px;
}
Within the my-div
, there is an article that is 1000 characters long, causing a scroll to appear.
My goal is to have the scrolling effect when I reach the article section inside the my-div
, where the scroll from scrolling down the window will also impact the scrolling within the div content.
<article>
<div class="my-div">
<!-- my content here -->
</div>
</article>
So essentially, when I scroll down the window to the bottom, it should automatically trigger the scroll within my div content.
Once the scroll within 'my-div' content is complete, it should then smoothly guide me to the footer
section without any interruptions.
I have been actively searching for a solution to this issue but haven't come across one yet.
Thank you for your assistance.
translation provided by: Google