MariaFY Posted December 13, 2023 Share Posted December 13, 2023 (edited) Hey guys, I could use some help with a scroll animation. my site: https://studiobeni.squarespace.com/ pw: maria I'm trying to slightly spin the ball graphic on my site, below is the code I used, I see that the animation is applying but not on scroll. /**Initial State**/ .sqs-block-image:has([src*='ball']) { transition:3s; } /**Animate State**/ .animate.sqs-block-image:has([src*='ball']) { animation: spin 3s; } // keyframes @keyframes spin { 0% { transform: rotate(-0deg); } 50% { transform: rotate(90deg); } 100% { transform: rotate(180deg); } } https://regrocery.co/ is the inspiration (scroll down to the section with the egg graphic to see the slight spin). I appreciate some pointers as I'm new to scroll animations. Edited December 13, 2023 by MariaFY added pw Link to comment
tuanphan Posted December 15, 2023 Share Posted December 15, 2023 CSS will work on Page Load But to make it work on Page Scroll, you will need JavaScript code. You want it to continuously spin, or just spin on scrolling then stop? 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
AJSlobig Posted March 2 Share Posted March 2 @MariaFY I just took a peek at your website, and it looks AMAZING! Would you be able to help me make similar animations? Or share the source that you found the ability to do it, I would be so blessed. Thank you! 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