Scroll Bars are not showing in mobile devices until it’s scrolled.

huangapple go评论51阅读模式
英文:

Scroll Bars are not showing in mobile deivces until it's scrolled,

问题

以下是翻译好的部分:

"Here I have added a table with max height if it exceeds the height then custom scroller shows. The issues is it's not showing on mobile devices until it's scrolled."

"I want to keep them on mobile devices even it's not scrolled."

英文:

Here I have added a table with max height if it exceeds the height then custom scroller shows.The issues is it's not showing on mobile devices until its scrolled.

enter image description here

.scan-by-blocks .scan-by-block .legend {
  max-height: 120px;
  overflow-y: auto;
}

.scan-by-blocks .scan-by-block .legend::-webkit-scrollbar {
  width: 8px;
}

.scan-by-blocks .scan-by-block .legend::-webkit-scrollbar-thumb {
  background-color: var(--grey-dark);
  border-radius: 5px;
  -webkit-box-shadow: inset 0 0 6px var(--grey-dark);
}

.scan-by-blocks .scan-by-block .legend::-webkit-scrollbar-track {
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 5px;
}

I want to keep them on mobile devices even it's not scrolled.

答案1

得分: 0

我不太确定,但你可以尝试将 `overflow-y: auto` 改为 `overflow-y: scroll`。

    .scan-by-blocks .scan-by-block .legend {
     max-height: 120px;
     overflow-y: scroll;
     touch-action: pan-y;
     -ms-touch-action: pan-y;
     -webkit-overflow-scrolling: touch;
    }

    .scan-by-blocks .scan-by-block .legend::-webkit-scrollbar {
     width: 8px;
    }

    .scan-by-blocks .scan-by-block .legend::-webkit-scrollbar-thumb {
     background-color: var(--grey-dark);
     border-radius: 5px;
     -webkit-box-shadow: inset 0 0 6px var(--grey-dark);
    }

    .scan-by-blocks .scan-by-block .legend::-webkit-scrollbar-track {
     background-color: rgba(0, 0, 0, 0.1);
     border-radius: 5px;
    }
英文:

I'm not quite sure yet, but can you try to change your overflow-y: auto into overflow-y: scroll?

.scan-by-blocks .scan-by-block .legend {
 max-height: 120px;
 overflow-y: auto;
 touch-action: pan-y;
 -ms-touch-action: pan-y;
 -webkit-overflow-scrolling: touch;
}

.scan-by-blocks .scan-by-block .legend::-webkit-scrollbar {
 width: 8px;
}

.scan-by-blocks .scan-by-block .legend::-webkit-scrollbar-thumb {
 background-color: var(--grey-dark);
 border-radius: 5px;
 -webkit-box-shadow: inset 0 0 6px var(--grey-dark);
}

.scan-by-blocks .scan-by-block .legend::-webkit-scrollbar-track {
 background-color: rgba(0, 0, 0, 0.1);
 border-radius: 5px;
}

答案2

得分: 0

.scan-by-blocks .scan-by-block .legend中的overflow-y: auto;更改为overflow-y: scroll;。如果问题仍然存在,请将下面的所有自定义滚动条样式注释掉,然后重试。

英文:

Change youroverflow-y: auto; to overflow-y: scroll; in .scan-by-blocks .scan-by-block .legend. If the issue persists, comment out all your custom scrollbar styles below and then retry it.

huangapple
  • 本文由 发表于 2023年5月22日 10:25:21
  • 转载请务必保留本文链接:https://go.coder-hub.com/76302715.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定