<script type="text/javascript" src="../Public/js/iscroll.js" ></script>
文件下载路径 https://yun.baidu.com/share/link?shareid=1550178100&uk=2772084022&third=0&fid=287334405334564
index:
<div id="wrapper">
<div>
111
</div>
</div>
css:
#wrapper{position: absolute;width: 100%; height: 1039px; overflow: hidden;}
#wrapper>div{width: 100%; height: 2600px;background-color: aqua; }
js:
initscroll()
//初始化滑动,必须元素处于显示状态 (#wrapper 必须处于显示状态然后调用initscroll函数才管用)
function initscroll(){
new IScroll('#wrapper', {
scrollX: true,
scrollY: false
});
}