Gigi-C Posted September 1 Share Posted September 1 Hey all! I have this codepen that I think is really cool to show previous projects on my website https://codepen.io/thomassaulay/pen/XWJdORa (currently I have a similar layout on my home page with a portfolio section but the images are static). However when I use this codepen and refresh the website it doesn't create that parallax effect I'm looking for. Could someone help me achieve it? I have also put the css code in <style></style> and JS in <script> </script> https://khaki-bumblebee-rgm8.squarespace.com/ website is live - no pass Thanks! Link to comment
tuanphan Posted September 4 Share Posted September 4 Squarespace - Codepen HTML uses a different HTML format, so to make code work, first you need to change your Squarespace section HTML, same as this format. If you can't do this, you can use Code Block > Copy - paste all code in HTML box Next add code in CSS box to Custom CSS With code in JS box, you need to use this code <script src="https://cdnjs.cloudflare.com/ajax/libs/rellax/1.10.0/rellax.min.js"></script> <script> // var scene = document.getElementById('hover-parallax'); // var parallaxInstance = new Parallax(scene); // parallaxInstance.friction(0.8, 0.8); // Parallax on scroll. From -10 to +10. var rellax = new Rellax('.rellax'); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment