移动解决方案

//px
<meta name="viewport" id="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<title>好运来,狗年旺</title>
<script>
	(function() {
		var w = screen.width, s = w/750;
		document.getElementById('viewport').content = 'width=750,initial-scale='+s+',minimum-scale='+s+',maximum-scale='+s+',user-scalable=no';
	})();
</script>
// REM
<script>
	window.onload = window.onresize = function () {
		var view_width = document.getElementsByTagName('html')[0].getBoundingClientRect().width;
		var _html = document.getElementsByTagName('html')[0];
		if (view_width > 640)
		{
			_html.style.fontSize = 640 / 16 + 'px';
		}
		else
		{
			_html.style.fontSize = view_width / 16 + 'px';
		}
	}
</script>

发表评论

电子邮件地址不会被公开。