Last active
December 20, 2015 13:29
-
-
Save ituki/6139527 to your computer and use it in GitHub Desktop.
画面を回転しても、viewportを320pxで固定したいとき ref: http://qiita.com/ituki_b/items/81af23d349ee139d72d3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=320"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta name="viewport" content="width=320"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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