gpt4 book ai didi

css - 溢出 : scroll not working in UIWebView in iOS 8

转载 作者:太空宇宙 更新时间:2023-11-03 23:28:11 39 4
gpt4 key购买 nike

在 iOS 8 中,我在 UIWebVIew 的网页中有以下代码,

<div id="outer">
<div id="middle">
<div id="inner"></div>
</div>
</div>

和下面的 CSS,

html {
height: 100%;
}
body {
height: 100%;
margin: 0;
}
#outer {
overflow: scroll;
}
#middle {
width: 160%;
height: 100px;
overflow: auto;
}
#inner {
background: red;
width: 80%;
height: 100%;
float: left;
clear: both;
overflow: auto;
}

在 iOS 7 中,这可以在 Web View 中提供一个可横向滚动的 div。但在 iOS 8 中,div 不可横向滚动。

有什么想法吗?我也尝试过 overflow: auto,但没有成功。

最佳答案

-webkit-overflow-scrolling: touch; 添加到您的 #inner block 。

关于css - 溢出 : scroll not working in UIWebView in iOS 8,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26150267/

39 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com