RdoubleS85 Posted August 11, 2023 Share Posted August 11, 2023 Please could I ask if someone can help me animate my whats app button to help it stand out more as a call to action. It currently works well but I feel as though it could be much more prominent. I have used the following code below (attached) in the code injection footer section image. Blinking, glowing or flashing would be ideal. Link to comment
Ziggy Posted August 11, 2023 Share Posted August 11, 2023 You could use keyframes to add a small animation, this is a good resource to adapt from: https://www.w3schools.com/css/css3_animations.asp RdoubleS85 1 Please like and upvote if my comments were helpful to you. Cheers! Zygmunt Spray Squarespace Website Designer Contact me: https://squarefortytwo.com Hire me on Upwork! 🔌 Ghost Squarespace Plugins (Referral link) 📈 SEO Space (Referral link) ⬛ SquareWebsites Plugins (Referral link) 🔲 SQSP Themes (Referral link) ✨ Spark Plugin (Referral link) 🖼️ Gallery Lightbox Plugin (Referral link) ☕ Did I help? Buy me a coffee? Link to comment
RdoubleS85 Posted August 16, 2023 Author Share Posted August 16, 2023 Hi Ziggy Before I decide to take a sledge hammer to my mac book are you able to interpret what i am doing wrong here? Link to comment
iamdavehart Posted August 16, 2023 Share Posted August 16, 2023 the line that specifies the animation (using the name you define the keyframes set with) needs to be in the rule for your whatsapp link, not out on its own. so move line 12 to line 8 in your screenshot. you definitely don't need all those key frames though. looks a little overkill... perhaps try using an "alternate" direction for your animation and an ease-in-out for your curve. so something like this might be a simpler view.. <a href="https://wa.me/447404686135" class="tp-whatsapp"> <img src="https://pluspng.com/img-png/whatsapp-hd-png-whatsapp-logo-png-1000.png" /> </a> <style> .tp-whatsapp { position:fixed; bottom:60px; right:30px; width:50px; height:50px; z-index:999; animation: pulse 1s ease-in-out 0s infinite alternate; } @keyframes pulse { 0% { transform: scale(1) rotate(-5deg); } 100% { transform: scale(1.1) rotate(5deg); } } </style> Ziggy and tuanphan 2 Dave Hart. Software/Technology Consultant living in London. buymeacoffee 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