• <i id='3n8Eg'><tr id='3n8Eg'><dt id='3n8Eg'><q id='3n8Eg'><span id='3n8Eg'><b id='3n8Eg'><form id='3n8Eg'><ins id='3n8Eg'></ins><ul id='3n8Eg'></ul><sub id='3n8Eg'></sub></form><legend id='3n8Eg'></legend><bdo id='3n8Eg'><pre id='3n8Eg'><center id='3n8Eg'></center></pre></bdo></b><th id='3n8Eg'></th></span></q></dt></tr></i><div id='3n8Eg'><tfoot id='3n8Eg'></tfoot><dl id='3n8Eg'><fieldset id='3n8Eg'></fieldset></dl></div>
    • <bdo id='3n8Eg'></bdo><ul id='3n8Eg'></ul>

      <small id='3n8Eg'></small><noframes id='3n8Eg'>

      <legend id='3n8Eg'><style id='3n8Eg'><dir id='3n8Eg'><q id='3n8Eg'></q></dir></style></legend>
    1. <tfoot id='3n8Eg'></tfoot>

        如何禁用水平拖动?(webkit-overflow-scrolling:触摸;

        时间:2023-05-30
        • <bdo id='B8xHH'></bdo><ul id='B8xHH'></ul>
            <tbody id='B8xHH'></tbody>
          • <legend id='B8xHH'><style id='B8xHH'><dir id='B8xHH'><q id='B8xHH'></q></dir></style></legend>

          • <tfoot id='B8xHH'></tfoot>

              <i id='B8xHH'><tr id='B8xHH'><dt id='B8xHH'><q id='B8xHH'><span id='B8xHH'><b id='B8xHH'><form id='B8xHH'><ins id='B8xHH'></ins><ul id='B8xHH'></ul><sub id='B8xHH'></sub></form><legend id='B8xHH'></legend><bdo id='B8xHH'><pre id='B8xHH'><center id='B8xHH'></center></pre></bdo></b><th id='B8xHH'></th></span></q></dt></tr></i><div id='B8xHH'><tfoot id='B8xHH'></tfoot><dl id='B8xHH'><fieldset id='B8xHH'></fieldset></dl></div>

              <small id='B8xHH'></small><noframes id='B8xHH'>

                • 本文介绍了如何禁用水平拖动?(webkit-overflow-scrolling:触摸;)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  对于 iOS 5 的 webkit 滚动触摸",我们可以使用以下 css 进行垂直滚动,但我们仍然可以左右拖动页面.我们如何禁用左右拖动?

                  We have vertical scrolling working fine with the following css for iOS 5's webkit scrolling 'touch', but we are still able to drag the page left and right. How can we disable left and right dragging?

                  这是 CSS:

                  #page_content{
                  
                  -webkit-overflow-scrolling: touch;
                  overflow-x:hidden;
                  overflow-y: scroll;   
                  position:absolute;
                  height: 460px;
                  width: 320px;
                  
                  }
                  

                  这是视频:
                  http://dl.dropbox.com/u/1737103/scrolling.mov

                  提前致谢!

                  推荐答案

                  我发现我可以通过查找/修复/删除比宽度更宽的元素来修复它.例如,如果你的容器上有 100% 的宽度,然后里面的元素有 100% 的宽度并带有边距或内边距,即使溢出隐藏在容器上,页面也会左右拖动.

                  I found I could fix it by finding/fixing/removing elements that were wider than the width. For instance, if you have a 100% width on your container, and then an element inside has 100% width with margin or padding, even if the overflow is hidden on the container, the page will drag from side to side.

                  如果您可以确保您的内部元素不会水平溢出到容器外,则页面不会拖动.如果您需要在容器内的百分比宽度上填充(例如一个 100% 宽度的元素,或者两个 50% 或其他的元素),'box-sizing:border-box;'是前进的方向.

                  If you can make sure your elements inside don't horizontally spill outside the container, the page won't drag. If you need padding on a percentage width inside the container (like one element with 100% width, or two with 50% or whatever), 'box-sizing: border-box;' is the way forward.

                  这篇关于如何禁用水平拖动?(webkit-overflow-scrolling:触摸;)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:iOS5.0.1 上的内存泄漏 drawInRect 下一篇:dismissModalViewControllerAnimated:(和dismissViewControllerA

                  相关文章

                  最新文章

                    <tfoot id='bVt9p'></tfoot>
                      <bdo id='bVt9p'></bdo><ul id='bVt9p'></ul>
                    <i id='bVt9p'><tr id='bVt9p'><dt id='bVt9p'><q id='bVt9p'><span id='bVt9p'><b id='bVt9p'><form id='bVt9p'><ins id='bVt9p'></ins><ul id='bVt9p'></ul><sub id='bVt9p'></sub></form><legend id='bVt9p'></legend><bdo id='bVt9p'><pre id='bVt9p'><center id='bVt9p'></center></pre></bdo></b><th id='bVt9p'></th></span></q></dt></tr></i><div id='bVt9p'><tfoot id='bVt9p'></tfoot><dl id='bVt9p'><fieldset id='bVt9p'></fieldset></dl></div>

                    <small id='bVt9p'></small><noframes id='bVt9p'>

                  1. <legend id='bVt9p'><style id='bVt9p'><dir id='bVt9p'><q id='bVt9p'></q></dir></style></legend>