溢出:自动不工作在触摸设备(iOS) [英] overflow:auto not working in touch devices(iOS)

查看:129
本文介绍了溢出:自动不工作在触摸设备(iOS)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实施了一个使用twitter bootstrap的网站。在网站的顶部,我使用了导航栏,里面使用了一个下拉菜单。下拉菜单由< < li>标签。我在dropdwon菜单中显示成员列表。当成员列表增长时,下拉菜单水平增长,为此我在下拉菜单类中添加了一个 overflow:auto 。现在它显示一个垂直滚动条,并在浏览器中工作正常。

I have implemented a website using twitter bootstrap. At the top of the site I have used a nav bar, and inside that used a dropdown menu. The dropdown menu is made up of < ul > and < li > tags. I am showing a list of members inside that dropdwon menu. When the list of member grows the dropdown menu grows horizontally, for which I have added a overflow: auto to the dropdown-menu class. Now its showing an vertical scroll bar, and working fine in browser.

但是同样的事情在iPad和其他iOs设备上无法工作。我已经google了,发现 -webkit-overflow-scrolling:touch 应该工作。但它不为我工作。很多其他解决方案也存在,但不幸的是不为我工作。

But the same thing is not working in iPad and other iOs devices. I have googled it and found -webkit-overflow-scrolling: touch should work. But it is not working for me. Lot of other solutions are also present, but unfortunately not working for me.

有没有更好的解决方案。可以使用css本身做任何事情。

Is there any better solution available. May be anything we can do using css itself.

推荐答案

将css属性添加到div标签中-webkit-overflow-scrolling :touch

Add the css property in to your div tag -webkit-overflow-scrolling: touch

这篇关于溢出:自动不工作在触摸设备(iOS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆