Previously wrote an article, introduced is I wrote a implementation of a custom scroll bar plug-in, because it was too hasty, actually did not detail the plug-in and plug-in use, now do a supplementary explanation,
Plugin Address: https://pan.baidu.com/s/1mhEwHLm
How to use:
var mainpanel = document.getElementById (' Mainpanel ');//This is our outermost parent container.
var scrollpanel = document.getElementById (' Scrollpanel ');//This Is your scrolling container
var content = document.getElementById (' LeftNav ');//This is the part you want to scroll
var leftskewing = 0;//Represents the absolute position of our outermost parent container from the left, and if our parent container is close to the left, this place will be 0.
New AutoScroll (Mainpanel, Scrollpanel, Content, leftskewing);//Initialize scroll bar
Pure JS Custom Horizontal scroll bar-supplemental instructions