0

I have a basic html structure like this:

<html>
    <head>
    <title>Hello world!</title>
    </head>
    <body>
        <div class="sbar-activator"></div>
    </body>
</html>

css:
html::-webkit-scrollbar{
    display:none;
}

.sbar-activator:hover AFFECT html::-webkit-scrollbar{
    display: the equivalent to true i dont know;
}

and as you might noticed i want to make scrollbar display when a div is hovered, i tested changing the AFECT to > , + and ~ but i dont get results I also changed the display in the hover to block

IMPORTANT : I want to change html scroll not div scroll

  • You need to set the `overflow` of your `div` to `scroll`, rather than trying to style the scrollbar itself. – Toastrackenigma Jul 31 '22 at 18:12
  • You can do something like this. [https://stackoverflow.com/questions/8631799/make-scrollbars-only-visible-when-a-div-is-hovered-over](https://stackoverflow.com/questions/8631799/make-scrollbars-only-visible-when-a-div-is-hovered-over) – Tec J Jul 31 '22 at 18:13
  • I want to change html scroll not div scroll – Mateo de Moya Jul 31 '22 at 18:14

0 Answers0