我希望我的应用程序可以垂直滚动并想使用 iscroll 来执行它。我不太确定如何使用。该应用程序似乎仍然无法垂直滚动。代码:
<head>
<script type="text/javascript" src="iscroll.js"></script>
<script type="text/javascript">
var myScroll;
function loaded() {
setTimeout(function () {
myScroll = new iScroll('container');
}, 100);
}
window.addEventListener('load', loaded, false);
</script>
</head>
<body>
<div class="container">
<div class = "topcontainer">
<div class = "buttons img1"> </div>
<div class = "buttonstext">
Gallery
</div>
</div>
<div class = "middlecontainer">
<div class = "buttons img2">
<a href="gallery.html">Biography</a>
</div>
</div>
<div class = "middlecontainer">
<div class = "buttons img3">
Pictures
</div>
</div>
</body>
需要一些指导,我哪里出错了。我需要做点别的吗?