How can I make canvas be 100% in width and height of the page?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
You can programatically set the canvas width + height:
I've tested this and it as long as you redraw what's on the canvas after you've resized it won't change the scaling.
you can use these codes without jquery
Well I have it working here: Are Google's Bouncing Balls HTML5? by using the following CSS:
Where #c is the id of the canvas element.
Does this work for you?
from Force canvas element in html to take up the entire window?
This has something to do with
<canvas>
tag.when create fullscreen canvas,
<canvas>
will cause scrollbar if not set to display:block.detail: http://browser.colla.me/show/canvas_cannot_have_exact_size_to_fullscreen
maybe that easy?