mardi 28 février 2017

How to use CSS combinators with webkit?

I'm trying to change vertical scrollbar thumb color on hovering the track part/piece.

The track is black and the thumb is green, I want to swap it when track is hovered.

See what I got:

html{
  overflow-x : hidden;
}
::-webkit-scrollbar {
    width: 6px;
     /*04ff00 background: #04ff00;    0B1B22*/
  }
  ::-webkit-scrollbar-track {
    background-color: #0B1B22;  
    }
  ::-webkit-scrollbar-thumb {
    background: #04ff00;
  } 
  ::-webkit-scrollbar-track:vertical:hover{
    background-color: #04ff00;  
  }
  ::-webkit-scrollbar-track:vertical:hover + ::-webkit-scrollbar-thumb{
    background-color: #0B1B22;
  } 
<body onLoad="window.scroll(0, 150)">    lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>lorem<br>



Aucun commentaire:

Enregistrer un commentaire