HTML5 Canvas fit to window

JavascriptWeb DevelopmentFront End Scripts

You need to use CSS to fit canvas to windows.

#box {
   overflow: hidden;
}
#canvas {
   position: absolute;
   top: 0px;
   left: 0px;
}
raja
Updated on 28-Jan-2020 07:38:32

Advertisements