简体   繁体   English

如何禁用(阻止)移动网站进行水平滑动?

[英]How to disable (prevent) the mobile web site from horizontal swipe?

I'm using following meta tags. 我正在使用以下元标记。 But as you can see in the pictures from the emulator, my website swipes with all the content in it.(Img 1 is the normal case which it supposed to look like and img 2 is the version that i'm trying to resolve.) I'm using small grids in it. 但是,正如您从模拟器的图片中看到的那样,我的网站在其中滑动了所有内容(图1是正常情况,应该看起来像它,而img 2是我要解决的版本)。我在其中使用小网格。 I have this problem only on Android devices. 我仅在Android设备上有此问题。

 <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">

在此处输入图片说明 在此处输入图片说明

Thanks in advance. 提前致谢。

You are having an overflowing issue, your one of the DIVs are going beyond the screen. 您遇到了很多问题,其中一个DIV超出了屏幕范围。 Check your HTML code and find out your culprit DIV. 检查您的HTML代码并找出罪魁祸首DIV。 Set DIV width to 100%. 将DIV宽度设置为100%。 I would have changed my HTML code a bit rather than using hack to prevent swiping, and hence horizontal scroll bar to appear. 我本来会稍微更改HTML代码,而不是使用hack来防止滑动,因此会出现水平滚动条。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM