lsc 2 年之前
父节点
当前提交
116b845b66
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      js/Desktop/Onload.js

+ 2 - 0
js/Desktop/Onload.js

@@ -55,6 +55,8 @@ var initViewport = function (height, width) {
     metaEl.setAttribute('name', 'viewport');
     metaEl.setAttribute('content', content);
 }
+var realHeight = window.innerHeight > window.innerWidth ? window.innerWidth : window.innerHeight
+var realWidth = window.innerHeight > window.innerWidth ? window.innerHeight : window.innerWidth
 initViewport(realHeight, realWidth);