Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Ipad和CSS属性溢出_Html_Css_Ipad_Overflow - Fatal编程技术网

Html Ipad和CSS属性溢出

Html Ipad和CSS属性溢出,html,css,ipad,overflow,Html,Css,Ipad,Overflow,我试图在div中添加右滚动条。这在大多数浏览器中都有效,但在使用iPad Safari时效果不佳。iPad不支持这个css属性吗 我准备了测试html。它也不起作用 <html> <head> <style> .ounner { border: solid 1px red; width:300px; height: 5

我试图在
div
中添加右滚动条。这在大多数浏览器中都有效,但在使用iPad Safari时效果不佳。iPad不支持这个
css
属性吗

我准备了测试html。它也不起作用

<html>
    <head>
        <style>
            .ounner {
                border: solid 1px red;
                width:300px;
                height: 500px;
                overflow:scroll ;
            }
            .inner{
                border: solid blue 1px;
                height: 700px;
                width: 400px;
            }
        </style>
    </head>
    <body>
        <div class="ounner">
            <div class="inner">
                sdsd
            </div>
        </div>
    </body>
</html>

欧纳先生{
边框:实心1px红色;
宽度:300px;
高度:500px;
溢出:滚动;
}
.内部{
边框:纯蓝1px;
高度:700px;
宽度:400px;
}
sdsd

溢出:自动
溢出:滚动
在MobileSafari上受支持,但由于iOS上不使用滚动条,因此滚动这些区域必须使用两根手指

有一个名为JavaScript的库,用于处理触摸事件并手动实现单指动量滚动;也许这是值得研究的。

我使用了css:

-webkit-overflow-scrolling: touch;
滚动也可以用一根手指(iPad2,iOS5.1.1)


希望有帮助,Filip

iOS Safari不会在元素上显示滚动条。要显示隐藏内容,需要用两个手指拖动。在Stackoverflow上的大型代码示例中也是如此。坦率地说,这是一种恼怒(当然是在iPhone上)。