Amir-A-M Posted June 20, 2021 Share Posted June 20, 2021 Hello, how can I have a sticky element? In this Code Pen I have a sticky header that works well, but the sticky element stays in place. For a better view, see the address below https://codepen.io/mr_mousavi/pen/LYWvWrR Thanks for these good libraries. See the Pen LYWvWrR by mr_mousavi (@mr_mousavi) on CodePen Link to comment Share on other sites More sharing options...
Али К Posted June 20, 2021 Share Posted June 20, 2021 Hello @Amir-A-M , just add data-scroll-container to your div at top <div class="smooth-scroll" data-scroll-container> 1 Link to comment Share on other sites More sharing options...
Solution Amir-A-M Posted June 20, 2021 Author Solution Share Posted June 20, 2021 4 hours ago, Ali Manuel said: Hello @Amir-A-M , just add data-scroll-container to your div at top <div class="smooth-scroll" data-scroll-container> Thanks but it still doesn't work for me. By checking the file below locomotive-scroll / blob / master / docs / index.html I noticed the data-scroll attribute. By adding it. It works well 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now