Navdeep Posted December 25, 2023 Share Posted December 25, 2023 Hi, I would like to add Happy New Year with mouse cursor on my Home page, please help Link to comment
Solution tuanphan Posted December 25, 2023 Solution Share Posted December 25, 2023 Something like this example? https://codepen.io/astrit/pen/QWbZgpR 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
Navdeep Posted December 26, 2023 Author Share Posted December 26, 2023 Thanks Tuanphan! Link to comment
tuanphan Posted December 27, 2023 Share Posted December 27, 2023 I see you marked it as answered. Do you still need code or you solved it? 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
Navdeep Posted December 27, 2023 Author Share Posted December 27, 2023 (edited) Hi Tuanphan, i have applied the below mentioned code in the advance section this enable the text in the header section however it won't apply on rest of the specific page, is there any solution for this...Pls note that i need it to be mentioned in the landing page only, please check... https://kiwianaimmigration.online/ <style> body { margin: 0; } .trail-container { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 9999; } .trailing-word { position: absolute; font-size: 16px; color: #ffffff; /* Set your desired color */ white-space: nowrap; opacity: 0.8; } </style> <script> document.addEventListener("DOMContentLoaded", function () { const container = document.createElement("div"); container.className = "trail-container"; document.body.appendChild(container); document.addEventListener("mousemove", function (e) { const word = document.createElement("div"); word.className = "trailing-word"; word.textContent = "Kiwiana Immigration wishes you a Happy New Year!"; const x = e.clientX; const y = e.clientY; word.style.left = x + "px"; word.style.top = y + "px"; container.appendChild(word); // Remove the word after a certain period setTimeout(() => { container.removeChild(word); }, 50); // Set the time (in milliseconds) you want the word to stay }); }); </script> Edited December 27, 2023 by Navdeep Link to comment
tuanphan Posted December 30, 2023 Share Posted December 30, 2023 Where did you get that code? 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment