我正在使用
-webkit-scrollbar
属性在iOS和Android上显示滚动条,但是在Android设备上滚动容器时,内容会根据滚动条的宽度闪烁。怎么解决这个问题?#container {
width: 200px;
height: 200px;
overflow-y: auto;
}
::-webkit-scrollbar {
width: 5px;
}
::-webkit-scrollbar-track {
background: rgba(0,0,0,0.5);
}
::-webkit-scrollbar-thumb {
margin-right: 5px;
border-radius: 5px;
background: rgba(255,255,255,0.5);
}