Hide useless scrollbars that show up on Windows only

后端 未结 1 999
醉梦人生
醉梦人生 2021-02-12 06:16

I have a bootstrap dropdown in my navbar that shows a list of notifications. It\'s pretty standard code, except that I set max-height: 300px; and overflow-y:

相关标签:
1条回答
  • 2021-02-12 06:20

    Change your scroll to:

    overflow-y: auto;
    

    Setting it to auto will display the scrollbar if its needed only, while scroll suggests there should always be a scrollbar.

    You can play around with different overflow propertys using this example or read more about it at the w3schools.

    Although you could consider using the -ms-overflow-style property, which you can find in the windows dev center:

    -ms-overflow-style: auto | none | scrollbar | -ms-autohiding-scrollbar
    
    0 讨论(0)
提交回复
热议问题