Tag:ES6 image switching effect

  • ES6 implementation of image switching effect code

    Time:2020-6-25

    design sketch demo.html <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <title>Document</title> </head> <body> <script type=”text/javascript”> Let arr = [“front end”, “jQuery”, “JavaScript”, “HTML”, “CSS”]; //Supplementary code let lis=”; let ul = document.createElement(‘ul’); function appendHTML( …innerhtml){ innerhtml.forEach(el => { let templates = `<li>`+el+`</li>`; lis+=templates; }); return lis; } appendHTML(…arr); ul.innerHTML=lis; document.body.appendChild(ul); </script> </body> </html> style.css * […]