[ Done ] case 0: what is the most efficient way of fitting the canvas to mobile screen? please Share me your personal experience
case 1: when i wrote canvas.width = window.innerWidth and canvas.height = window.innerHeight, my canvas element did not fit to the screen it was slightly towards right and bottom, but it should of worked see case 3 code ////////////////////////////////////////////// case 2 (see case 2 css and compare it with case 1) to fix it inside my css i set the width and height to 100% then it started working. so my question is why i had to use css part (case2) ?? it should of worked in case 1. because innerWidth and innerHeight basically gives us the mobile screen inside width and height. ////////////////////////// case 3 by using console.log(innerWidth, innerHeight) i found my device screen height and width so i applied it to css directly (see case 3) // no javascript has been used except console.log() https://code.sololearn.com/WpDoB3qyd0rq/?ref=app https://code.sololearn.com/WQM6bp42c1Ft/?ref=app https://code.sololearn.com/Ws22DGRVsRT1/?ref=app