龍巖易富通網(wǎng)絡(luò)科技有限公司

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

iscroll使用方法

2018.06.12 | 2077閱讀 | 0條評論 | 通用代碼

<!DOCTYPE html>

<html>

<head>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />

<meta charset="utf-8" />

<title>iscroll演示</title>

<script src="jquery-1.9.1.min.js"></script>

<script src="iscroll.js"></script> 

<style type="text/css">

   a {color: #000;}

   li {list-style: none;}

   body {overflow: hidden;}

   .wrapper {position: relative; height: 100%;}

   .scroller {position: absolute; width: 100%;   transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0);   -moz-transform: translate3d(0,0,0);}

</style>

<script type="text/javascript">

var myScroll1;

function loaded() {

   myScroll1 = new IScroll('.wrapper', { mouseWheel: true, click: true });

}

</script>

</head>

<body onload="loaded()">

    <div id="wrapper">

        <div id="scroller">

               <ul>

                    <li></li>

                    ...

                </ul>

        </div>

    </div>

</body>

</html>


贊 (

發(fā)表評論