bootstrap – IOS上没有滚动条?
我正在使用引导版本2.x,当我在非移动浏览器上使用应用程序的滚动条正常工作,但是当我浏览使用iOS(iphone 5)没有滚动条 – 特别是垂直滚动条,我不能触摸滚动屏幕 – 它只是固定我不能更多的左或右或上或下……
有什么我需要启用触摸滚动像一个不同的JS库吗? 或者是有什么坏的。
我已经阅读,如果标签没有正确closures这可能会发生,但我的标签是封闭的。
所以基本上我所有的内容现在都不可见了,除了第一部分我不能向下滚动…
这里是一些代码(我使用杜兰达作为SPA)
这是我的shell:
<div> <header> <!--ko compose: {view: 'nav'} --><!--/ko--> </header> <section id="content" class="main container-fluid"> <!--ko compose: {model: router.activeItem, afterCompose: router.afterCompose, transition: 'entrance'} --> <!--/ko--> </section> <footer> <!--ko compose: {view: 'footer'} --><!--/ko--> </footer> </div>
此刻我删除了所有的“导航”和“页脚”渲染,只有在内容HTML呈现在那里一个简单的页面:
<section> <div> <button id="btnrefresh" class="btn btn-info btn-force-refresh pull-right"><i class="icon-refresh"></i> Refresh</button> <button id="btnrefresh2" data-bind="click: refresh" class="btn btn-info btn-force-refresh pull-right"><i class="icon-refresh"></i> Data Refresh</button> <h3 class="page-title" data-bind="text: title" ></h3> <div data-bind="visible: showDetails" style="height:500px;width:50px;background-color:red"> </div> </div> </section>
这将不会滚动在IOS 🙁
答案是这是一个杜兰达尔的问题。
经过严格的debugging和剥离除了杜兰达之外的一切,我想通过打开durandal / app.js和注释掉以下几行代码可以解决这个问题:
adaptToDevice: function() { //document.ontouchmove = function (event) { // event.preventDefault(); //}; }
干杯