<script> document.addEventListener("DOMContentLoaded", function () { const marqueeElement = document.querySelector(".marquee"); const text = marqueeElement.textContent; const speed = 200; marqueeElement.textContent = ""; // Clear the text initially let index = 0; function typeWriter() { if (index < text.length) { marqueeElement.textContent += text.charAt(index); index++; setTimeout(typeWriter, speed); } } typeWriter(); }); </script>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter