how to make a nice scroll bar in a webpage html

12,846

There are 100s of options available for custom scroll bars these days. They're usually as simple as assigning a class to a div, and then calling the plugin function on load:

<div class="myscrollingdiv" style="overflow:scroll; height:200px;"></div>

$(function(){
   $(".myscrollingdiv").jScrollPane();
});

http://jscrollpane.kelvinluck.com/

Share:
12,846
Gnijuohz
Author by

Gnijuohz

I use Python primarily nowadays. I've previously worked with Django on several small projects and now trying out Flask. I have some experience with front end web development as well. Been using Mongodb for the past few months and am quite happy with it so far. I also developed an iOS app with Swift and node.js named GeeksforGeeks Reader, which has good reviews in the U.S. App Store. I'm interested in working with Swift, node.js more in the future.

Updated on June 05, 2022

Comments

  • Gnijuohz
    Gnijuohz almost 2 years

    I have seen some web pages have a very nice scroll bar when a div element overflows.It's not the default one and looks like scroll bars in iPhone.A good example is twitter's when you click on someone to see more information.I'm not sure I'm putting this clearly...

    I have a div to display in my page and it's likely to overflow and when it does,I want a nice scroll bar with it,not the default one.Someone knows how to accomplish that?Or there's some open source project I can use? Thanks a lot!