网上查了一些资料,提到的很少,应该是苹果手机 ios系统升级到 13.0版本后  

-webkit-overflow-scrolling: touch;  会导致滚动条自定义样式无效
 
-webkit-overflow-scrolling: auto; 或者不写这个,如果还是无效,添加下面的红色样式部分,添加一处就可以,如果有其他的解决方式欢迎留言告知
 
下面的写法才可以
::-webkit-scrollbar{
 width: 4px!important;
    height: 4px!important;
    background-color: #F5F5F5;
 border: 4px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb,
::-webkit-scrollbar-thumb:hover,
::-webkit-scrollbar-thumb:active{
 background-color: red;
    border-radius: 2px;
    border: 4px solid transparent;
    background-clip: content-box;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
  • 2021-07-09
猜你喜欢
  • 2021-06-20
  • 2021-12-24
  • 2021-10-31
相关资源
相似解决方案