-webkit溢出滚动:触摸打破我的-webkit滚动CSS在iOS中 [英] -webkit-overflow-scrolling: touch breaks my -webkit-scrollbar css in iOS
本文介绍了-webkit溢出滚动:触摸打破我的-webkit滚动CSS在iOS中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
此代码非常适合样式滚动条:
This code works great for styling scrollbars:
.frame::-webkit-scrollbar {
-webkit-appearance: none;
background-color: #000;
}
.frame::-webkit-scrollbar:horizontal {
height: 6px;
}
.frame::-webkit-scrollbar-thumb {
background-color: #000;
}
.frame::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #333;
}
但是每次我想让它触摸启用),所有滚动条消失
But everytime i want to make it touch enabled (for easing in the mobile scrolling), all scrollbars disappear
.frame {
-webkit-overflow-scrolling: touch;
}
在iOS或手机中保留滚动条的任何解决方案?
Any solution to keep the scrollbar in iOS or mobiles?
推荐答案
您可以使用css为webkit浏览器自定义滚动条风格或启用
You can either custom style your scrollbars with css for webkit browsers or enable
-webkit-overflow-scrolling: touch;
他们都不能在最新的旅行中一起工作。如果你把两者都只有触摸就可以工作。在Iphone 5和6中测试
Both of them doesnt work together in latest safaris. If you put both only touch will work. Tested in Iphone 5 and 6
这篇关于-webkit溢出滚动:触摸打破我的-webkit滚动CSS在iOS中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文