How to Add Loading Animation to Website in 2 Minutes!

preview_player
Показать описание
Add loading animation screen to website in just 2 minutes using event listener to hide the loader automatically when loading is completed.
=== Follow us on ===
Рекомендации по теме
Комментарии
Автор

Some improvement:
1.Change position: absolute to position:fixed and add z-index:1000 - A higher number -
2.Add a class with overflow:hidden to the body ( like: .preload {overflow: hidden;} ) don' forget to add the class to the body ( <body class="preload">...</body>)
3.Remove it when the page is loaded in the Jquery function ( ) inside $(window).on("load", function() {...});
You will notice the improvement when you'll get a page with a scrollbar.
Hope it will help someone.

BIhab-jbzk
Автор

Great and simple tutorial!
One suggestion: Instead of using 'position: absolute' to cover the page, I would use 'position: fixed' so if the site has a scroll bar, the animation covers all of it, not only the top part.

pedrosilva
Автор

Simple, to the point and answers the question that everyone came here for, Thanks!!

codewithryan
Автор

I had wanted to add a loader for a long time but couldnt get it to work. Thanks for this easy and good tutorial:)

phoenixflight
Автор

Cool, these little touches take a website from good to great!

plixplop
Автор

BEAUTIFUL!!! Thanks, every tutorial should be like this XD

caiofdacosta
Автор

great work in few seconds, simple, clear, great, Thanks Men <3 !

sofianebenhamza
Автор

This just solved half of my problems. Thanks!

iliamm
Автор

Great video, I've been looking for this tutorial for the past 4 hours, but all i saw was how to create a loading animation without actually applying it to the page

funnyariyo
Автор

Great video bro
love your work...
a ton of thanks for sharing your info and knowledge.

MuhammadIrfan
Автор

Thank you! That was really fast and useful

danielahermosillo
Автор

I want this loader but I don't have anything on my page that takes time to load. how can I make the loader stay on the page for 2 seconds for example and then go instead of waiting for all of the items on the page to load in?

fshhh
Автор

Video starts at 0:22 if someone is too lazy for watching 21 seconds

bitslay
Автор

thank youuu, it´s exactly what I was looking for :D.

eduardosaroka
Автор

Hi, some more changes were done and it did an awesome work for me, same concept was used on android app too.

goelsahab
Автор

How come if I add a background image, the loader doesn't work and freezes and disappears?

lewislendon
Автор

Can I ask if how to do this one if..lets take this case.. after I click the login button then it loads.. how can I direct this to my homepage? Thanks for the response

justinclydecartuciano
Автор

thankyou so much, this was very helpful

madhumur
Автор

How can I replace the cube with an image instead

JAk-
Автор

Where should I place the code?
After Head?

bladymheradop