【发布时间】:2015-10-11 09:29:46
【问题描述】:
我正在使用overflow-scroll = "true" 使离子使用本机滚动:
<ion-content overflow-scroll = "true">
<ion-list>
<ion-item ng-repeat="foo in bar">
{{foo.label}}
</ion-item>
</ion-list>
</ion-content>
这真的很好用(性能真的很好)。唯一的问题是(垂直)滚动条消失了。
根据documentation,我尝试将scrollbar-y="true" 添加到ion-content,但没有成功。
我也尝试将其添加到我的 css 中:
::-webkit-scrollbar {
-webkit-appearance: none;
}
::-webkit-scrollbar:vertical {
width: 11px;
}
::-webkit-scrollbar:horizontal {
height: 11px;
}
::-webkit-scrollbar-thumb {
border-radius: 8px;
border: 2px solid white;
background-color: rgba(0, 0, 0, .5);
}
::-webkit-scrollbar-track {
background-color: #fff;
border-radius: 8px;
}
...但这也没有用。
This article(查找“本机滚动”)表示可以使用 css 解决问题。
有人知道怎么做吗?
【问题讨论】:
-
你能得到答案吗?
-
观看此答案:stackoverflow.com/questions/22866285/… 它对我有用...
-
@GerardCarbó 是的,它确实有效,谢谢!我将此添加为响应,以便其他观众更容易看到。
标签: android html css ionic-framework