css overflow 'auto' on edge

Viewed 474

I need to hide the overflow scroll bar on Edge.

I have the current properties on the required scroll area and it's working in macos chrome/safari.

height: "240px", maxHeight: "240px", overflowY: "auto"

I also added the following

  html {
    -ms-overflow-style: -ms-autohiding-scrollbar;
  }

Desire Behavior The scroll bar should hide, unless user is scrolling.

How can I auto hide the bars?

enter image description here

2 Answers

Answer:

From the accepted answer, I modified and use :hover to get the desire behavior.

    .mydiv {
        overflow-y: 'hidden'
     }
     .mydiv:hover {
         overflow-y: 'auto'
     }
Related