身体溢出:隐藏在移动浏览器中不起作用

时间:2013-01-31 11:47:51

标签: mobile touch overflow

溢出:隐藏的body元素在桌面浏览器上运行良好。但移动浏览器/触摸屏会忽略此行为。

<style>
body {overflow:hidden; height:100%; width:100%;}
.content {height:2000px; width:1000px;}
</style>


<body>
    <div class="content"> long content </div>
</body>

我认为问题来自触摸!?但我不知道如何解决这个问题。

1 个答案:

答案 0 :(得分:0)

不确定它是否有帮助,但我绕过它的方式是在body标签内使用另一个容器来包装其他所有内容并将溢出放在上面。即。

.siteContainer{
    position:relative;
    overflow:hidden;
}
相关问题