【发布时间】:2015-08-11 01:13:00
【问题描述】:
我在 data-role="content" 中使用插件 iscroll,但我的整页中出现了一个巨大的滚动条:
scrollbar
我已经尝试过在 SO 中找到的一些解决方案,例如:
但没有任何作用。
我也检查了这个website,但也没有运气。
你能帮帮我吗?
我的HTML:
<div data-role="content" data-theme="c">
<div id="Container"></div>
<div id="Treelist">
<div id="scroller">
<ul id="Listview" ></ul>
</div>
</div>
</div>
我的CSS
html, body {
height: 100%;
width: 100%;
margin: 0;
overflow: hidden;
}
#Treelist {
position:relative;
z-index:1;
top:0;
bottom:0;
left:0;
width:100%;
overflow: hidden;
/* Prevent native touch events on Windows */
-ms-touch-action: none;
/* Prevent the callout on tap-hold and text selection */
-webkit-touch-callout: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/* Prevent text resize on orientation change, useful for web-apps */
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
-o-text-size-adjust: none;
text-size-adjust: none;
}
#scroller {
position:relative; z-index:1;
/* Prevent elements to be highlighted on tap */
-webkit-tap-highlight-color: rgba(0,0,0,0);
/* Put the scroller into the HW Compositing layer right from the start */
-webkit-transform: translateZ(0);
-moz-transform: translateZ(0);
-ms-transform: translateZ(0);
-o-transform: translateZ(0);
transform: translateZ(0);
}
#Treelist ul {
position:relative;
list-style:none;
padding:0;
margin:0;
width:100%;
text-align:left;
}
#Treelist li {
padding:0 10px;
height:150px;
/* line-height:40px; */
border-bottom:1px solid #ccc;
border-top:1px solid #fff;
background-color:#fafafa;
font-size:14px;
}
【问题讨论】: