How to set scrollbar on the website?

Here is the code:
::-webkit-scrollbar-button { 
background-image:url("); 
background-repeat:no-repeat; 
width:6px; 
height:0px 
} 

::-webkit-scrollbar-track { 
background-color:#32312e; 
box-shadow:0px 0px 0px #000 inset; 
} 

::-webkit-scrollbar-thumb { 
-webkit-border-radius: 5px; 
border-radius: 0px; 
background-color:#28a7f0; 
background-image:url('https://yraaa.ru/_pu/24/59610063.png'); 
background-position:center; 
background-repeat:no-repeat; 
} 

::-webkit-resizer{ 
background-image:url("); 
background-repeat:no-repeat; 
width:7px; 
height:0px 
} 

::-webkit-scrollbar{ 
width: 9px; 
}

How to make it:
  • Translucent
  • Smoothly retractable after the scroll
  • On top of the layout (this means that if the color of the scrollbar to make it translucent, then under it will be seen the contents of the page and that he has no influence whatsoever on the contents page; it is just on the top layer, in the terminology of graphical editors).
August 19th 19 at 22:47
1 answer
August 19th 19 at 22:49
The only possibility is to make the body overflow:hidden and wrap content in div, which will have a custom scrollbar, which you control via JS.

Native styling of the scrollbar is supported by extremely tight, especially cross-browser.

Find more questions by tags CSS