I ve created a game using HTML5. the canvas size is 320x480. When the webpage opens in the browser of an iphone the canvas area will be placed in the left top corner of the browser and unless i zoom it i cannot play the game. What is that i can do .. please help. Thanks.
You need to set the meta tag for viewport to the size of the iPhone screen.
<meta name="viewport" content="width=device-width; height=device-height; initial-scale=1.0; maximum-scale=1.0;"/>
This will scale the page correctly so that you do not have to zoom in at first, and will prevent the user from scaling after the page has opened.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With