英文:
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.
.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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论