浏览代码

Examples: More flexible iOS workaround.

Mr.doob 9 年之前
父节点
当前提交
2005d6745c
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/index.html

+ 2 - 2
examples/index.html

@@ -268,8 +268,8 @@
 
 		if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) {
 
-			viewer.style.width = window.innerWidth - 310 + 'px';
-			viewer.style.height = window.innerHeight + 'px';
+			viewer.style.width = getComputedStyle( viewer ).width;
+			viewer.style.height = getComputedStyle( viewer ).height;
 			viewer.setAttribute( 'scrolling', 'no' );
 
 		}