0

Hey! I want to make a typing effect on a code with code box ,what I want to do?

Please give reply to my question

24th May 2023, 5:50 AM
Prajwal Paratkar
Prajwal Paratkar - avatar
2 ответов
24th May 2023, 6:02 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 1
Prajwal Paratkar <div style="color:white;background-color:black;width:270px;height:50px;padding:20px;word-break:break-word;"> <code id="fx"></code </div> <script> const txt = "There is a fine line between asking for help and just being lazy..."; let i= 0; function typeWriter(){ if (i < txt.length) { fx.textContent += txt.charAt(i); i++; setTimeout(typeWriter, 100); } } typeWriter(); </script>
24th May 2023, 8:12 AM
Bob_Li
Bob_Li - avatar