rstacruz / nprogress

For slim progress bars like on YouTube, Medium, etc
http://ricostacruz.com/nprogress
MIT License
26.15k stars 1.82k forks source link

Can I move the spinner to the middle of the screen? #240

Open phpcontrols opened 2 years ago

phpcontrols commented 2 years ago

I wanted to users to know that they need to wait for the spinner to go away before proceed. Possible?

tiagorangel1 commented 2 years ago

Great idea, +1!

Tof-Arei commented 2 years ago

These CSS overrides seem to be working in my case :

#nprogress .spinner {
    /* ... */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#nprogress .spinner-icon {
    /* ... */
    margin: auto;
    /* ... */
}

There must be cleaner ways to achieve this, but time is a scarce commodity... ^^'