【问题标题】:how to make the scroll visible如何使滚动可见
【发布时间】:2023-03-17 01:17:01
【问题描述】:

我有一张表,它的行数可以随时间增加。 我希望在表格的高度达到最大值(150px)时立即显示滚动,而不仅仅是在我滚动鼠标时(如果有意义的话),这样用户就会有更多行的指示。

我尝试了下一个风格,但没有运气

  <div   id="eventType"  style="max-height:150px;overflow:scroll !important;">

当表格达到最大值时会显示滚动,但仅在我滚动鼠标时才会显示,而不是立即滚动。 有什么建议吗?

【问题讨论】:

    标签: html css scroll scrollbar


    【解决方案1】:

    CSS - Overflow: Scroll; - Always show vertical scroll bar?

    添加到您的 CSS:

    ::-webkit-scrollbar {
      -webkit-appearance: none;
      width: 7px;
    }
    
    ::-webkit-scrollbar-thumb {
      border-radius: 4px;
      background-color: rgba(0, 0, 0, .5);
      box-shadow: 0 0 1px rgba(255, 255, 255, .5);
    }
    

    【讨论】:

      猜你喜欢
      • 2014-05-30
      • 2023-02-01
      • 2023-03-17
      • 2021-06-20
      • 2022-01-09
      • 2014-07-20
      • 2016-09-14
      • 1970-01-01
      • 2019-06-04
      相关资源
      最近更新 更多