5.1K
Preloader animation effect with HTML and CSS
We can create lots of animation effects using HTML and CSS. In this tutorial, I am going to create a Preloader animation effect with HTML and CSS. It is simple and easy to create. Just I have used here::after and::before to make a preloader animation effect. Let’s see the example of preloader animation.
HTML
<!DOCTYPE html>
<html>
<head>
<title>loader</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrap">
<div class="loader"></div>
</div>
</body>
</html>
CSS
body{
justify-content: center;
align-items: center;
display: flex;
height: 100vh;
background:#333;
}
.wrap{
width: 80px;
height: 80px;
padding: 10px;
background: #f2f2f2;
border-radius: 50%;
}
.loader{
width: 80px;
height: 80px;
margin: 0 auto;
position: relative;
animation: spin 4s linear infinite;
}
.loader:before,
.loader:after{
content: "";
width: 14px;
height: 14px;
border-radius: 14px;
box-shadow: 18px 18px #0DB14C, -18px -18px #0189D2;
transform: translateX(-50%) translateY(-50%);
position: absolute;
top: 50%;
left: 50%;
animation: load 1.2s linear infinite;
}
.loader:after{
box-shadow: 18px 18px #6461AB, -18px -18px #CD014F;
transform: translate(-50%, -50%) rotate(90deg);
}
@keyframes load{
50%{ height: 42px; }
}
@keyframes spin{
100%{ transform: rotate(360deg); }
}
For More Tutorials Please Click Here
25 comments
Hello, I enjoy reading aⅼl of yoսr article post. I wаnted to ѡrite a little
comment to support you.
Nice weblog right here! Additionally your website a lot up fast!
What web host are you the use of? Can I get your affiliate link to your host?
I wish my website loaded up as quickly as yours lol
Namecheap
Its like you read my mind! You seem to know a lot about this, like you wrote the book in it
or something. I think that you could do with a few pics to drive the message home a little bit,
but other than that, this is excellent blog.
An excellent read. I’ll definitely be back.
Hello, Neat post. There is an issue with your website in internet explorer, might
check this? IE still is the market leader and a large component to folks will leave out your wonderful writing due to this problem.
Nice post. I was checking continuously this blog and I am impressed!
Very helpful information specifically the last part 🙂 I care for such information a lot.
I was seeking this certain information for a very long time.
Thank you and best of luck.
Great blog here! Also your site loads up fast!
What host are you using? Can I get your affiliate link to your host?
I wish my site loaded up as quickly as yours lol
https://www.casinogurus.org
Hey I am so glad I found your website, I really found you
by error, while I was browsing on Digg for something
else, Anyhow I am here now and would just like to say many
thanks for a marvelous post and a all round interesting blog (I also love the theme/design), I don’t have time to
go through it all at the moment but I have bookmarked it and also included your RSS feeds, so when I
have time I will be back to read much more, Please do keep up the excellent work.
I’ve read so many articles, this one is nice, Regards, IDProperti.com | Pasang Iklan Properti
Every weekend i used to visit this site, as i wish for enjoyment, as this this
website conations really fastidious funny information too.
Someone essentially help to make critically posts I’d state.
That is the first time I frequented your website page and to this point?
I amazed with the analysis you made to create this actual put up extraordinary.
Great process!
Howdy very nice site!! Man .. Excellent ..
Wonderful .. I will bookmark your website and take the feeds also?
I’m satisfied to find numerous useful info right here within the put
up, we need work out more techniques on this regard, thank you for sharing.
. . . . .
Thanks to my father who shared with me on the topic of
this webpage, this blog is truly awesome.
I am truly thankful to the holder of this web site who has shared this great post at at this
time.
You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand.
It seems too complicated and extremely broad for me.
I’m looking forward for your next post, I’ll try to get the
hang of it!
It’s a shame you don’t have a donate button! I’d certainly donate
to this superb blog! I guess for now i’ll settle for book-marking and adding your
RSS feed to my Google account. I look forward
to new updates and will share this website
with my Facebook group. Talk soon!
Aw, this was an incredibly good post. Taking the time and
actual effort to create a great article… but what
can I say… I hesitate a lot and don’t seem to get anything done.
Hello! I simply want to offer you a big thumbs up for your great information you’ve
got right here on this post. I’ll be coming back to your website
for more soon.
It’s really a great and useful piece of information. I’m
happy that you just shared this helpful info with us.
Please keep us informed like this. Thank you
for sharing.
What’s up, its pleasant post concerning media print, we all be aware of media is a wonderful source
of information.
Your style is so unique compared to other folks I’ve read stuff from.
Thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this web site.
Highly descriptive post, I enjoyed that bit. Will there be
a part 2?
Hello, I check your new stuff on a regular basis. Your writing style is awesome, keep doing what
you’re doing!
Hello i am kavin, its my first time to commenting anyplace, when i read this paragraph
i thought i could also create comment due to this sensible piece
of writing.
Thanks very interesting blog!