Malisa Huzaifa - Web Multimedia HTML6 Canvas & SVG

52 <html> <head> <style> #canvas{border:3px solid black; } </style> </head> <body> <canvas id="canvas" width=500 height=400></canvas> </body> <script> const textToDisplay = "Wellcome"; const textStyle = "red"; const BGStyle = "white"; const textSpeed = 0.15; const textHorMargin = 8; var canvas=document.getElementById("canvas"); var ctx=canvas.getContext("2d"); ctx.font = Math.floor(canvas.height * 0.5) + "px arial"; var textWidth = ctx.measureText(textToDisplay).width; var totalTextSize = (canvas.width + textHorMargin * 2 + textWidth);

RkJQdWJsaXNoZXIy MTM3NDc5MQ==