问题
I want to make scrollbar that overlaps the page. I wonder if there is a way to do it with pure CSS. I read an article about styling scrollbars with CSS (https://css-tricks.com/custom-scrollbars-in-webkit) but I didn't get a result I wanted. I think it would be possible to do it with some JavaScript and HTML element with fixed position, but I prefer to do it with CSS.
回答1:
You can try changing the background of the Scrollbar to transparent-
::-webkit-scrollbar-track {background: transparent}
回答2:
I have this same requirement in my project.
Here is the solution:
overflow: overlay
Hope it helps
来源:https://stackoverflow.com/questions/39253887/how-to-make-scrollbar-overlapping-page-content