直接上代码!!!
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
ul, li {
list-style: none;
}
#wrapper {
width: 100%;
}
.up, .down, li {
height: 49px;
line-height: 49px;
text-align: center;
}
.up {
display: none;
background-color: darkgrey;
color:#ffffff;
border-bottom: 1px solid lightgrey;
}
.down {
display: none;
background-color: darkgrey;
color: #ffffff;
}
li {
background-color: darkgrey;
border-bottom: 1px solid lightgrey;
}
#wrapper {
position: relative;
height: 500px;
background: #aaa;
overflow: hidden; /*iscroll不能设置overflow为auto*/
}
#scroller {
position: absolute;
left: 0;
top: 0;
width: 100%;
}
.iScrollVerticalScrollbar {
/*设置凹槽的样式*/
position: absolute;
z-index: 10;
width: 5px;
top: 0;
right: 0;
overflow: hidden;
height: 100%;
border-radius: 10px;
}
.iScrollIndicator {
/*设置滚动条的样式*/
width: 100%;
background: orange;
border-radius: 10px;
height: 30%;
}
</style>
</head>
<body>
<div , load, false);
</script>
</body>
</html>
关于iscroll5的相关属性和方法,请参考http://blog.csdn.net/sweetsuzyhyf/article/details/44195549/