Home > Enterprise >  Is it possible to use keyframes animation on scrollbar thumb?
Is it possible to use keyframes animation on scrollbar thumb?

Time:11-05

I was playing around with styling the scrollbar and wanted to add some animations to it(HTML and CSS only). I tried this code but it's not working. Any ideas?

body::-webkit-scrollbar-thumb {
  background: #196bd7;
  border-radius: 10px;
  animation: scrollbar1 5s infinite;
}

@keyframes scrollbar1 {
  0%{ background: blue; }
  25%{ background: red; }
  100%{ background: chartreuse; }
} 

CodePudding user response:

You cant' use keyframes or transitions on scrollbar

Although you can achieve it by some tricky css stylings, for more information check this out

  • Related