我正在为ios和android工作。在平板电脑上运行时,方向是横向的。
当应用程序在android平板电脑上运行时,包含的样式文件是正确的,但当应用程序在iPad 2上运行时,包含的样式文件是错误的。
然后我在android平板电脑上得到警报window.outerHeight
和window.outer
,它是768和1024。除了ipad2上是1024和1024。应该是768
和1024
。
这是meta标签:
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
如何在ipad2上将window.outerHeight
设置为768 ?
有没有试过删除
<meta content="telephone=no" name="format-detection" />
我有这个问题,对我来说,它是在viewport meta标签(height=device-height)。代码中唯一值得怀疑的似乎是
<meta content="telephone=no" name="format-detection" />