Webkit scrollbar dynamic styling

后端 未结 8 1860
清歌不尽
清歌不尽 2021-01-04 00:15

I\'m currently styling the scrollbar using Webkit\'s ::-webkit-scrollbar CSS properties and would like to change these properties on a mousemove event. The problem is that I

8条回答
  •  无人及你
    2021-01-04 00:27

    you can define a function in JavaScript with your own css.

    function overFlow(el) {
       el.style.cssText = "overflow: auto;";
    }
    

    using in html:

    
    
    
    Something

    More Info: https://css-tricks.com/almanac/properties/s/scrollbar/

提交回复
热议问题