Skip to content

Instantly share code, notes, and snippets.

@ituki
Last active December 20, 2015 13:29
Show Gist options
  • Save ituki/6139527 to your computer and use it in GitHub Desktop.
Save ituki/6139527 to your computer and use it in GitHub Desktop.
画面を回転しても、viewportを320pxで固定したいとき ref: http://qiita.com/ituki_b/items/81af23d349ee139d72d3
<meta name="viewport" content="width=320">
<meta name="viewport" content="width=320">
var agent = navigator.userAgent;
if (agent.search(/Android/) !== -1) {
$('meta[name=viewport]').attr({'content': 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no'});
$(window).bind('resize load', function(){
$("html").css("zoom" , $(window).width()/320);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment