wearesilk Posted October 23, 2019 Share Posted October 23, 2019 hey guys, my english is not that good but i try to explain my question. I would like to build a one page website with a "scroll lock" effect. Is there any css code or tutorial how to make this effect? You can see this scroll effect at https://workflow-films.de Thank you and best wishes from germany! Dani Link to comment
brandon Posted October 23, 2019 Share Posted October 23, 2019 Hi @wearesilk. This can be accomplished. It is often called "scroll snapping" in modern-day CSS terms. However, CSS scroll snapping is still a bit unreliable and difficult to cross-browser test. So, another alternative is to use JavaScript. Here's an example of what can be accomplished using index page sections in Brine. Your specific application may require a lot more consideration (section length becomes a major concern with layouts like this that have to entirely fit on the screen, one-at-a-time). You'd most likely need to hire a developer to write the code to accomplish it, even if using third-party tools. If your layout is quite simple, it might be easier to write a custom implementation than to bend third-party tools to do your bidding. Understanding that this doesn't help you accomplish it, I do hope this helps a little in that it shows that it's possible. -Brandon If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
wearesilk Posted October 24, 2019 Author Share Posted October 24, 2019 14 hours ago, brandon said: Hi @wearesilk. This can be accomplished. It is often called "scroll snapping" in modern-day CSS terms. However, CSS scroll snapping is still a bit unreliable and difficult to cross-browser test. So, another alternative is to use JavaScript. Here's an example of what can be accomplished using index page sections in Brine. Your specific application may require a lot more consideration (section length becomes a major concern with layouts like this that have to entirely fit on the screen, one-at-a-time). You'd most likely need to hire a developer to write the code to accomplish it, even if using third-party tools. If you're layout is quite simple, it might be easier to write a custom implementation that bend third-party tools to do your bidding. Understanding that this doesn't help you accomplish it, I do hope this helps a little in that it shows that it's possible. -Brandon Note: For the sake of others finding this, you might consider renaming the title of this question to something like " How to Create Full Page Sections / Single Page Website with Locked Scrolling / CSS Snapping " Hey Brandon, thank you so much. this is exactly my idea os scrolling through my page. is there any chance to see the code you use for this effect? maybe i can play around and find the right code for my website. and thanx for your advise, i have to work on my english to ask better questions 🙂 greetings from germany, Dani! Link to comment
brandon Posted October 28, 2019 Share Posted October 28, 2019 Hi Dani. Unfortunately I'm a bit swamped at the moment, and the code used on the example site is a prototype, is over-complicated and prone to failure. It's probably not ready to be put into production, since it would need a few more features added to check for various conditions (like content length) and adjust accordingly. I do hope to come back to this soon and post a more flexible solution. Also, your English is much better than my German! My suggestion about the post title was simply to include as many similar terms as possible, so that others may be able to find your question even if they type in something slightly different. -Brandon If a response helped you out, send a 'Like' 👍 (bottom-right) and/or 'Upvote' (top-left) Link to comment
Justmadeit Posted November 16, 2019 Share Posted November 16, 2019 If you're looking for an answer I used Brine. Paste into header code injection. Let me know how you go. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/scrollify/1.0.19/jquery.scrollify.min.js"></script> <script> $(function() { $.scrollify({ section : ".Index-page", }); }); </script> Link to comment
wearesilk Posted December 19, 2019 Author Share Posted December 19, 2019 Hey guys, thank you so much for your help. The code from Justmadeit works like a dream on my website. Even on mobile it´s perfect. THANKS 🙂 Link to comment
iamjamesbooth Posted May 26, 2020 Share Posted May 26, 2020 Hey there peeps, do you know if this will work on Squarespace 7.1 - i'm using Nolan as a base. would really appreciate any thoughts!? Thanks James Link to comment
Jamesmads Posted October 10, 2020 Share Posted October 10, 2020 I would like to know this as well. Link to comment
NWCPhotos Posted November 12, 2020 Share Posted November 12, 2020 On 11/16/2019 at 6:55 PM, Justmadeit said: If you're looking for an answer I used Brine. Paste into header code injection. Let me know how you go. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/scrollify/1.0.19/jquery.scrollify.min.js"></script> <script> $(function() { $.scrollify({ section : ".Index-page", }); }); </script> This code works great on my site for the desktop version, but doesn't play nice with the mobile versions. Is there a way to disable it on the mobile version of the site? Link to comment
tuanphan Posted November 12, 2020 Share Posted November 12, 2020 12 hours ago, NWCPhotos said: This code works great on my site for the desktop version, but doesn't play nice with the mobile versions. Is there a way to disable it on the mobile version of the site? Have you solved it yet? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
NWCPhotos Posted November 12, 2020 Share Posted November 12, 2020 3 hours ago, tuanphan said: Have you solved it yet? I have not it's driving me crazy because it look's so great on desktop and I want to keep it there but unless I can get it disabled on mobile I'll have to just ditch it entirely. Link to comment
ShootiezProductions Posted August 17, 2021 Share Posted August 17, 2021 On 11/16/2019 at 1:55 PM, Justmadeit said: If you're looking for an answer I used Brine. Paste into header code injection. Let me know how you go. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/scrollify/1.0.19/jquery.scrollify.min.js"></script> <script> $(function() { $.scrollify({ section : ".Index-page", }); }); </script> Hi! I used this and it works great by how do I change it so it only scroll snaps to my home page instead of the other pages on my website? Thanks in advance Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.