[英]scrolling issue on iPad and Android
I have two scrollable divs. 我有两个可滚动的div。 One for vertical scroll and and one for horizontal scrolling with the folowing structure:
一种用于垂直滚动,另一种用于水平滚动,采用以下结构:
HTML: HTML:
<div class="main">
<div class="vscoller">
<div class="nohscroll">Some text</div>
<div class="hscroller">
<div class="body">Some text</div>
</div>
</div>
</div>
CSS: CSS:
.main {
width: 400px;
height: 400px;
border: solid 1px black;
overflow-y: auto;
overflow-x: hidden;
}
.vscoller {
height: 5000px;
width: 400px;
position: relative;
}
.nohscroll {
width: 150px;
background-color: green;
height: 5000px;
}
.hscroller {
width: 250px;
overflow-x: auto;
overflow-y: hidden;
position: absolute;
left: 150px;
top: 0;
}
.body {
background-color: gray;
height: 5000px;
width: 5000px;
}
On iPad and Android I can't scroll up and down on the .body
div. 在iPad和Android上,我无法在
.body
div上上下滚动。 Can you tell me how can I correct this? 你能告诉我如何纠正吗?
我现在已经尝试过了,并且可以正常工作,我的猜测是您可能在html头中缺少以下行:
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.