问题描述
当用户在我的网站上执行搜索时,我想在带有垂直滚动条的小 div 中显示结果,而不是用户需要滚动整个页面.这在所有浏览器中都很完美,但我在 iPad 上遇到了问题.我可以看到搜索结果不适合 div,但 iPad 上没有显示滚动条.此外,当我尝试在 div 内滚动时,会滚动整个页面.有没有办法让这个工作?
HTML 和 CSS:
//这里我显示搜索结果div.searchResult{高度:540px;溢出:-moz-scrollbars-vertical;溢出-y:滚动;}
我相信答案是除非使用双指方法否则无法滚动.但是,如果您查看最后一个链接,则有一个解决方法.
问题:
CSS 溢出属性在 iPad 中不起作用
http://www.webmanwalking.org/library/experiments/dsp_frames_outer_document.html
解决方法:
http://cubiq.org/scrolling-div-on-iphone-ipod-触摸
When a user perform a search on my website I want to show the result in a small div with vertical scrollbars instead of that the user need to scroll the full page. That works perfect in all browsers BUT I get problems on the iPad. I can see that the search result doesn't fit into the div but no scroll bar is showing up on the iPad. Also when I try to scroll inside the div the full page is scrolled instead. Is there a solution to get this working?
HTML AND CSS:
<div class="searchResult">
//Here I show the search result
</div>
div.searchResult
{
height: 540px;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}
I believe the answer is that you cannot scroll unless you use the two-finger methods. However if you look at the last link, there is a workaround.
Issues:
CSS Overflow property not working in iPad
http://www.webmanwalking.org/library/experiments/dsp_frames_outer_document.html
Workaround:
http://cubiq.org/scrolling-div-on-iphone-ipod-touch
这篇关于iPad 上 div 垂直滚动条的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!