Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/437.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 为什么我能';当我跟随Instagram的链接时,是否在应用程序浏览器中禁用滚动?_Javascript_Html_Css_Safari_Inappbrowser - Fatal编程技术网

Javascript 为什么我能';当我跟随Instagram的链接时,是否在应用程序浏览器中禁用滚动?

Javascript 为什么我能';当我跟随Instagram的链接时,是否在应用程序浏览器中禁用滚动?,javascript,html,css,safari,inappbrowser,Javascript,Html,Css,Safari,Inappbrowser,我在应用程序浏览器中遇到垂直滚动问题 我使用iPhone SE 这就是我试图修复它的方式。但我所能做的就是从工具栏下抬起按钮,但我没有解决滚动的问题 函数setHeight(){ //获取没有浏览器工具栏的窗口高度 var windowsHeight=window.innerHeight; //我试着用这种方法解决这个问题,但我认为这不明智 var forinsta=窗口高度-70; //确定用户访问站点的位置 var ua=navigator.userAgent | | navigato

我在应用程序浏览器中遇到垂直滚动问题

我使用iPhone SE

这就是我试图修复它的方式。但我所能做的就是从工具栏下抬起按钮,但我没有解决滚动的问题

函数setHeight(){
//获取没有浏览器工具栏的窗口高度
var windowsHeight=window.innerHeight;
//我试着用这种方法解决这个问题,但我认为这不明智
var forinsta=窗口高度-70;
//确定用户访问站点的位置
var ua=navigator.userAgent | | navigator.vendor | | window.opera;
var isInstagram=(ua.indexOf('Instagram')>-1)?真:假;
如果(isInstagram){
//如果用户从Instagram访问该站点,我将innerHeight设置为-70px
document.getElementById('wrapper').style.height=forinsta+'px';
document.body.style.height=forinsta+'px';
}否则{
//否则只需设置内部高度
document.getElementById('wrapper').style.height=windowsHeight+'px';
document.body.style.height=windowsHeight+'px';
}
}
设置高度();
window.onresize=函数(事件){
设置高度();
};
html{
位置:相对位置;
溢出:隐藏;
身高:100%;
}
身体{
字体:16px Arial,Helvetica,无衬线;
线高:1.4;
溢出:隐藏;
位置:相对位置;
身高:100%;
}
#包装纸{
位置:相对位置;
溢出:隐藏;
身高:100%;
}
//游泳运动员
.swiper容器{
位置:绝对!重要;
左:0;
排名:0;
宽度:100%;
身高:100%;
z指数:10;
}

滑块内容