0
虽然标题几乎是一样的,我的问题是不是Prevent orientation change in iOS Safari重复(我改变了答案,使下面的代码)防止取向变化
我写了下面的代码,因此,如果用户旋转iPad的/ iPhone/iPod,我旋转的内容,他将不得不旋转设备正常看到的内容。
if(window.orientation==90)
{
document.getElementById("orient").style.webkitTransform="rotate("+window.orientation+"deg)";
document.getElementById("orient").style.webkitTransformOrigin="0px 0px";
document.getElementById("orient").style.top=screen.height+"px";
}
当我旋转我的设备时,内容消失。 有人可以帮我做这个工作吗?
它从风景到肖像而不是从肖像到风景 – user1365010