(function(){
	function resize(){
		var baseFontSize = 75;//确保跟config配置文件的remUnit一致
		var designWidth = 750;
		// var width = window.innerWidth;
		var width = window.screen.width;
		if(window.innerWidth && window.screen.width){
			width = Math.min(window.innerWidth,window.screen.width)
		}
		var currentFontSize = (width/designWidth)*baseFontSize;
		// document.querySelector('html').style.fontSize = currentFontSize+'px';
		document.documentElement.style.fontSize = currentFontSize+'px';
	}
	// 页面大小发生变化时
	window.onresize = function(){
		resize()
	}
	// 文档载入时监听修改文字大小
	document.addEventListener('DOMContentLoaded',resize)
}())