09-04-2013 03:22 AM
HI, I have a HTML5 app and the problem is that ,it appears zoomed in while opening and the user have to zoom out manually to use it, It is a game called stone paper scissor and please help me with the problem
Solved! Go to Solution.
09-04-2013 06:53 PM - edited 09-04-2013 06:56 PM
Add this to the top of your <head> element:
<script> var meta = document.createElement("meta"); meta.setAttribute('name','viewport'); meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no'); document.getElementsByTagName('head').appendChi
09-05-2013 07:07 AM
<script> <meta name="viewport" id="viewport" content="initial-scale=1.0,user-scalable=no, maximum-scale=1.0" target-densitydpi="device-dpi"/> </script>
I alredy have this , i think both works the same , let me check this one
09-06-2013 04:38 PM
Was deprecated by the W3C, so it doesn't work anymore. Use what the other developer posted if you'd like to lock the viewport.