Advertisement
artemsemkin

Rubenz smooth scroll bar

Nov 3rd, 2024
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.92 KB | None | 0 0
  1. [data-scrollbar] {
  2.   display: block;
  3.   position: relative;
  4. }
  5.  
  6. .scroll-content {
  7.   -webkit-transform: translate3d(0, 0, 0);
  8.   transform: translate3d(0, 0, 0);
  9. }
  10.  
  11. .scrollbar-track {
  12.   position: absolute;
  13.   opacity: 0;
  14.   z-index: 1;
  15.   background: rgba(222, 222, 222, .75);
  16.   -webkit-user-select: none;
  17.   -moz-user-select: none;
  18.   -ms-user-select: none;
  19.   user-select: none;
  20.   -webkit-transition: opacity 0.5s 0.5s ease-out;
  21.   transition: opacity 0.5s 0.5s ease-out;
  22. }
  23.  
  24. .scrollbar-track.show,
  25. .scrollbar-track:hover {
  26.   opacity: 1;
  27.   -webkit-transition-delay: 0s;
  28.   transition-delay: 0s;
  29. }
  30.  
  31. .scrollbar-track-x {
  32.   bottom: 0;
  33.   left: 0;
  34.   width: 100%;
  35.   height: 8px;
  36. }
  37.  
  38. .scrollbar-track-y {
  39.   top: 0;
  40.   right: 0;
  41.   width: 8px;
  42.   height: 100%;
  43. }
  44.  
  45. .scrollbar-thumb {
  46.   position: absolute;
  47.   top: 0;
  48.   left: 0;
  49.   width: 8px;
  50.   height: 8px;
  51.   background: rgba(0, 0, 0, .5);
  52.   border-radius: 4px;
  53. }
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement