Implement a linear loading progress bar at the top of the web page

Plug-in 1: NProgress.js

Download link: https://github.com/rstacruz/nprogress

 

Plug-in 2: MProgress.js
 

Download link: https://github.com/lightningtgc/mprogress.js/


 

Both plug-ins implement web page loading progress bars, and there are four default methods:

start(): Start the progress bar
 

set(num): maximum progress, default 0 to 1
 

inc(): Increase the speed. When the progress bar starts, this function can be used.

done(): The progress bar runs directly to completion

Guess you like

Origin blog.csdn.net/m0_62336865/article/details/130395626