📌  相关文章
📜  在 html 中使画布覆盖整个屏幕 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:30.138000             🧑  作者: Mango

代码示例2
function resize() {
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
    render();
}
window.addEventListener('resize', resize, false); resize();
function render() { // draw to screen here
}