CSS hide scroll bar, but have element scrollable

前端 未结 8 1529
南旧
南旧 2021-01-30 03:46

I have this element called items and the content inside the element is longer than the element height, I want to make it scrollable but hide the scroll bar, how would I do that?

8条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-30 04:30

    You can make use of the SlimScroll plugin to make a div scrollable even if it is set to overflow: hidden;(i.e. scrollbar hidden).

    You can also control touch scroll as well as the scroll speed using this plugin.

    Hope this helps :)

提交回复
热议问题