cog loading animation

How we can create a cog or gear loader animation using pure HTML and CSS? Solution: See this COG Loading Animation With Pure CSS, HTML CSS Gear Preloader.

Previously I have shared a loader animation pack with 12 different types of animation, but this is a cog/gear type loader. Basically, preloaders or loaders are the animation effect that you see on the screen while the page is loading. Preloaders animations used to entertain visitors while server operations finish processing.

Today you will learn to create HTML CSS Gear Preloader. Basically, there are 3  COG or GEAR which is rotating continuously like a working engine. The 3 cogs have different colors and shape, the first one is large, the second one smaller than the first cog, and the last cog is smaller than the others 2. Bellow the COGs there is a text “Loading“, which is for showing that this is a loading animation.

So, Today I am sharing COG Loading Animation With Pure CSS. There I have used pure CSS and HTML for creating the whole animation, without JS or any library. If you want a good preloader animation for your website, then you can use this after making changes according to your choice. You can change color and speed after some changes.

If you are thinking now how this loader animation actually is, then see the preview given below.

Preview Of Gear Preloader

See this video preview to getting an idea of how this loading animation looks like.

Live Demo

Now you can see this visually, also you can see it live by pressing the button given above. If you like this loader animation, then get the source code of its.

You May Also Like:

COG Loading Animation With Pure CSS Source Code

Before sharing source code, let’s talk about it. First I have created the main div with class name ‘loader‘ and put another div inside it. Inside these two divs, I have placed 3 other sections to create the 3 gears. Each gear or cog div has 4 divs inside, 3 for creating the shape and other 1 for the circle in middle.

Now using CSS I have placed all the elements in the right place, as you can see in the preview. For creating the gear shape I have used three rectangles which are based on 3 divs in every section. I have just rotated those rectangular divs in 30 degrees, 60 degrees, and 90 degrees. After that, I have used border-radius for making circular edges.

And for creating the continuously moving effect, I have used CSS @keyframe command and rotated all divs for creating the effect. Left all other things you will understand after getting the codes, I can’t explain all in writing. For creating this loader you have to create only 2 files, one for HTML and one for CSS. Follow the steps to creating this without any error.

index.html

Create an HTML file named ‘index.html‘ and put these codes given below.

style.css

Now create a CSS file named ‘style.css‘ and put these codes given here.

That’s It. Now you have successfully created COG Loading Animation With Pure CSS, HTML CSS Gear Preloader. If you have any doubt or questions comment down below.

Thanks For Visiting, Keep Visiting.

LEAVE A REPLY

Please enter your comment!
Please enter your name here