JavaScript
changeViewportMeta = function() {
var device_width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
if (device_width < 375) {
var initial_scale = device_width / 375;
return $('meta[name=viewport]').attr('content', 'width=device-width, initial-scale='+initial_scale);
} else {
return $('meta[name=viewport]').attr('content', 'width=device-width, initial-scale=1');
}
};
$(window).bind('orientationchange', changeViewportMeta);
$(document).ready(function() {
changeViewportMeta();
}
Read More
댓글 없음:
댓글 쓰기