In this tutorial you are going to learn how to add this nice preloader to your website, using your own images.
See it here: (click the little reload icon on the top right)
Features:
- Flash through 6 images
- Easily swap with your own images
- Checks for image load time, to play it at the ideal time for UX and Performance
- Plays when the browser has focus (the animation won't play out if opened in a background tab, for example)
- Play only once per visit (optional)
- Change the color of the lines at the end, ideally to match your page's background color
This tutorial is only recommended for users comfortable with modifying CSS. Due to the nature of the design, and all the different variations that could be made out of it, this particular tutorial comes with limited customization support & help. I will only support in cases where you can't get it working at all. I won't help with making it look this or that way, or changing the animation.
Thank you for your understanding!
Let's get started!
First, add this code to your project
This is a premium tutorial. Purchase access to unlock the full tutorial.
4 Responses
How do I get support? As the preloader is showing only a black screen?
Hey Ben! You are at the right place for support. Please share your URL with me where you are testing this, I will have a look!
If you prefer you can also email it to me : maxime@element.how
Could I use this Preloader with Dynamic content?
Greetings!
Yes.
You would create 6 custom fields with the name slugs:
preloader_image_1
preloader_image_2
preloader_image_3
preloader_image_4
preloader_image_5
preloader_image_6
These would need to return the URL of the image directly, not an array, not the ID of the selected image.
Then, you edit the CSS to change:
to this:
and the same for all the other images.
Then, lower down in the code, change this line:
to this:
Then the images URLs will come dynamically from the custom fields on the current post or page.
I hope this helps!
Cheers!