The code of Loading in Html with Css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Loading Animation</title>
<style>
*{
margin: 0;
padding: 0;
}
section{
height: 100vh;
width: 100%;
background-color: #000;
}
.main{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.loading{
border-right: 5px solid white;
height: 175px;
width: 175px;
border-radius: 50%;
animation: loading 3s linear infinite;
}
@keyframes loading {
to{
transform: rotate(0deg);
}
from{
transform: rotate(360deg);
}
}
@keyframes size {
0%{
font-size: 2rem;
}
25%{
font-size: 2.2rem;
}
50%{
font-size: 2.4rem;
}
75%{
font-size: 2.2rem;
}
100%{
font-size: 2rem;
}
}
.main h1{
color: white;
font-size: 2rem;
font-weight: lighter;
animation: size 2s linear infinite;
/* color: cyan; */
/* text-shadow: 0px 0px 10px #fff, 0px 0px 20px #fff; */
}
.lhead{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
</style>
</head>
<body>
<section>
<div class="main">
<div class="lhead"><h1>loading</h1></div>
<div class="loading"></div>
</div>
</section>
</body>
</html>
Comments
Post a Comment