Implement vertical scrolling within a page that targets a specific section without moving the entire page
P粉946437474
P粉946437474 2023-08-15 19:29:46
0
1
386
<p>I've seen this effect on some pages: you scroll down, but the page itself seems to be motionless. Therefore, some elements will fade in or out, appear or disappear. I have a section containing 5 cards. Now I want to create the same effect. When I scroll down to the section, I want to navigate the section by scrolling up and down. Depending on where I am currently, I want a card to be shown or hidden. </p> <p>I started by adding <code>overflow: scroll</code> to that section, but then I ran out of ideas to create this effect. </p>
P粉946437474
P粉946437474

reply all(1)
P粉739942405

Use background-attachment:fixed; to set the background fixed for a specific part.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!