移动端rem布局必要的meta和script

<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<script type="text/javascript">
		new function() {
			document.documentElement.style.fontSize = innerWidth / 6.4 + "px";
			window.addEventListener("resize", function() {
				document.documentElement.style.fontSize = innerWidth / 6.4 + "px";
			}, false);
		};
		
	</script>
posted @ 2017-04-07 15:01  sakura-sakura  阅读(207)  评论(0编辑  收藏  举报