11

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. scrollbar

Nejc Jezersek
  • 333
  • 5
  • 12

2 Answers2

15

I have this same requirement in my project.

Here is the solution:

overflow: overlay

Hope it helps

RienNeVaPlu͢s
  • 6,574
  • 6
  • 36
  • 72
-4

You can try changing the background of the Scrollbar to transparent-

::-webkit-scrollbar-track {background: transparent}
theLearner
  • 298
  • 2
  • 16