Home >Web Front-end >HTML Tutorial >Make HTML5 canvas fill the entire page
For the canvas to fill the entire page, the width and height of the page need to be 100%.
* { margin: 0; padding: 0; } body, html { height:100%; } #canvas { position:absolute; height:100%; width:100%; }
The above is the detailed content of Make HTML5 canvas fill the entire page. For more information, please follow other related articles on the PHP Chinese website!