有webkit溢出滚动的外观CSS规则:touch“handle”在iOS 5? [英] Are there appearance CSS rules for webkit-overflow-scrolling: touch "handle" in iOS 5?
问题描述
我有一个元素恰好有-webkit溢出滚动:触摸和背景颜色:黑色,所以显示滚动位置的手柄是很难看到。有没有-webkit CSS样式规则,可以改变该句柄的外观(特别是颜色)或我困在近黑色着色?
I have an element that happens to have both -webkit-overflow-scrolling: touch and background-color: black so the "handle" that shows scroll position is very difficult to see. Are there -webkit CSS style rules that can alter the appearance (specifically the color) of that "handle" or am I stuck with the near-black coloring?
推荐答案
您可以使用正常的滚动条样式,例如: :: - webkit-scrollbar
, :: - webkit-scrollbar -track
, :: - webkit-scrollbar-thumb
更改滚动的div。
You can use the normal scrollbar styles, ex: ::-webkit-scrollbar
, ::-webkit-scrollbar-track
, ::-webkit-scrollbar-thumb
to alter the div that scrolls.
但是,如果 -webkit-overflow-scrolling
设置为touch,则黑色默认滚动条将会显示,以及自定义滚动条。
However, if the -webkit-overflow-scrolling
is set to 'touch', the black default scrollbar will show up as well as your custom scrollbar.
但是,如果 -webkit-overflow-scrolling
设置为'auto',它只会显示您的自定义滚动条。不是最深刻的答案,但这是一个开始我想。
But, if -webkit-overflow-scrolling
is set to 'auto', it only your custom scrollbar shows. Not the most profound answer, but it's a start I think.
这篇关于有webkit溢出滚动的外观CSS规则:touch“handle”在iOS 5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!