DEV Community

Discussion on: I made 100 CSS loaders for your next project

Collapse
 
afif profile image
Temani Afif

yes you can, as you can see most of the progress rely on background-size going from 0% 0% to X 0%. All you have to do is to update the X until you reach the max value (the one I used in the keyframe)

Collapse
 
programmer285 profile image
programmer285

I have another question how do I center it ?

Thread Thread
 
afif profile image
Temani Afif

It depends on your HTML strucutre. Each loader is a single div so any centring method will work (flexbox, CSS grid, position:absolute, etc)

Collapse
 
programmer285 profile image
programmer285

Thank you, I appreciate your work a lot.

Some comments have been hidden by the post's author - find out more