How to completely fill web page with HTML canvas?



To make canvas fill the whole page, you need to be 100% in width and height of the page.

* {
   margin: 0;
   padding: 0;
}
body, html {
   height:100%;
}
#canvas {
   position:absolute;
   height:100%; width:100%;
}
Updated on: 2020-01-29T10:51:22+05:30

400 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements