Nprogress.js: Loading progress bar: http://ricostacruz.com/nprogress/
Based on these several methods
It's on the site.
I see this code in one place
nprogress.configure ({ '<div class= ' bar ' role= ' bar ' style= ' background:white ' > <div class= "Peg" style= "box-shadow:0 0 10px #fff, 0 0 5px #fff;" ></div></div><div class= "Spinner" role= "spinner" ><div class= "Spinner-icon" style= " Border-top-color:white;border-left-color:white "></div></div>" });
What do you say?
Can't you see it on the website?
And then I figured it out on the page.
You used this plugin.
And then you define the load bar and the control bar that loads the scroll.
You can add these two lines of code.
The display on the page is
<div id="nprogress"><divclass="Bar"role="Bar"style="background:red; Transform:translate3d ( -0.6%, 0px, 0px); Transition:all 200ms ease;"><divclass="Peg"style="box-shadow:0 0 10px #fff, 0 0 5px #fff;"></div></div><divclass="Spinner"role="Spinner"><divclass="Spinner-icon"style="Border-top-color:white;border-left-color:white"></div></div></div>
You see that?
It turns into something like this.
Configure as the name implies is the meaning of configuration
Template is the meaning of templates.
is to put this template in nprogress.
<script type="text/javascript"> $ (function () { nprogress.configure ( { Template: $ ('#myId'// template is the property used to set the animation style }); Nprogress.start (); }); $ (window). Load (function () { nprogress.done (); }) </script>
This myid you can be on the page, you can also define in JS
And then you can introduce the template like this.
Yes
Role=bar: Horizontal Load Bar
Role=spinner Rotating Small Circle
This blog is also recommended http://www.cnblogs.com/xuange306/p/5122451.html this blog is very clear, you can go and see it.
Nprogress.js Template