UNPKG

typewrite-simple

Version:
26 lines (24 loc) 820 B
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>Example - Strings with nested HTML</title> </head> <body> <div id="typewrite"></div> <script src="../../dist/core.js"></script> <script type="text/javascript"> const instance = new Typewrite('#typewrite', { strings: [ '<span class="wrapper"><span class="span-1">Hello</span>, <span class="span-2">How</span> <span class="span-3">are</span> <span class="span-4">you</span>?</span>', '<span class="wrapper"><strong>Test</strong></span>' ], autoStart: true, loop: true, delay: 10 }) </script> </body> </html>