Safari在可滚动div内容的对角线滑动时冻结

时间:2016-04-18 06:31:45

标签: jquery html css safari mobile-safari

我的Html页面上有一个简单的可滚动div,用于MOBILE例如。

       <div id="outer">
        <div id="inner">scrollable long content....</div>
        </div>

        and CSS
        #outer {
            background: white none repeat scroll 0 0;
            height: 300px;
            left: 0;
            margin-top: 47px;
            padding: 0.5rem;
            position: absolute;
            top: 0;
            width:65%;
            z-index: 1200;

        }
        #inner{
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0px;
           overflow: auto;
            -webkit-overflow-scrolling: touch; 
        }

问题是,如果我在手机屏幕上从左上角向右对角滚动,那么Safari会冻结几秒钟,如果我不断反复滑动屏幕,屏幕会长时间冻结。之前我使用过jQuery移动但删除它,问题仍然存在简单的Html也。             请帮忙。
            实际上我需要可滚动的侧面板而不需要滚动主页面。

1 个答案:

答案 0 :(得分:0)

如果您只希望侧边栏在可见时滚动,则必须设置

overflow = 'hidden';

关闭内容div并在关闭侧边栏时再次将其删除。 为什么它在移动设备上冻结,仍然是一个问题。