Browse Source

去掉字体比例系数

zhanghe 6 years ago
parent
commit
d1a44ec5e6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/stage/index/index.html

+ 2 - 2
src/stage/index/index.html

@@ -19,7 +19,7 @@
 		    var user_webset_font = getComputedStyle(doc.documentElement, false)['fontSize'];
 		  }
 			//取整后与默认16px的比例系数
-		  var xs = parseFloat(user_webset_font) / 16;
+		  // var xs = parseFloat(user_webset_font) / 16;
 			var docEl = doc.documentElement, //根元素html
 			//判断窗口有没有orientationchange这个方法,有就赋值给一个变量,没有就返回resize方法。
 			resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
@@ -27,7 +27,7 @@
 				var clientWidth = docEl.clientWidth;
 				if (!clientWidth) return;
 				if (clientWidth < 1920) {
-					docEl.style.fontSize = 100 * (clientWidth / 1920) / xs + 'px';
+					docEl.style.fontSize = 100 * (clientWidth / 1920) + 'px';
 				} else {
 					docEl.style.fontSize = 100 + 'px';
 				}