简体   繁体   English

滚动条未隐藏在Android chrome中

[英]Scrollbar is not hiding in Android chrome

I tried below options to hide scrollbar in my app 我尝试了以下选项来隐藏我的应用程序中的滚动条

  1. body::-webkit-scrollbar {display: none;} 正文::-webkit-scrollbar {显示:无;}

  2. body::-webkit-scrollbar {width:0; 正文::-webkit-scrollbar {width:0; background: transparent;} 背景:透明;}

Both the options are working fine in desktop but when I try in Android chrome, it is not working. 这两个选项在桌面上都可以正常工作,但是当我在Android chrome中尝试时,它无法正常工作。

I've had this problem in the past, and the way I solved it was replacing overflow: scroll with overflow: auto; 我过去曾遇到过此问题,而解决问题的方法是替换overflow: scrolloverflow: scroll overflow: auto; which would still allow the div to be scrollable without showing the scroll bars. 这仍然允许div在不显示滚动条的情况下可滚动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM