Computer >> Computer tutorials >  >> Programming >> Javascript

HTML5 Canvas fit to window


You need to use CSS to fit canvas to windows.

#box {
   overflow: hidden;
}
#canvas {
   position: absolute;
   top: 0px;
   left: 0px;
}