<!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>Rings Animation</title>
</head>
<style>
body{
margin: 200px;
padding: 0;
display: flex;
justify-content: center;
align-items: 100vh;
background: radial-gradient(#78d5ff, #0081e8);
}
.loader{
position: relative;
width: 180px;
height: 180px;
display: flex;
justify-content: center;
align-items: center;
transform-style: preserve-3d;
transform: perspective(500px) rotateX(45deg);
}
.loader span{
position: absolute;
display: block;
border: 15px solid #fff;
box-sizing: border-box;
border-radius: 50%;
box-shadow: 0 10px 0 #e0e0e0, inset 0 10px 0 #e0e0e0;
animation: animate 4.5s ease-in-out infinite;
}
.loader span:nth-child(1){
animation-delay: 0s;
}
.loader span:nth-child(2){
animation-delay: -1.5s;
}
.loader span:nth-child(3){
animation-delay: -3.0s;
}
@keyframes animate {
0%{
transform: translateZ(-100px);
width: 100%;
height: 100%;
}
25%{
transform: translateZ(100px);
width: 100%;
height: 100%;
}
50%{
transform: translateZ(100px);
width: 35%;
height: 35%;
}
75%{
transform: translateZ(-100px);
width: 35%;
height: 35%;
}
100%{
transform: translateZ(100px);
width: 100%;
height: 100%;
}
}
</style>
<body>
<div class="loader">
<span></span>
<span></span>
<span></span>
</div>
</body>
</html>
Nenhum comentário:
Postar um comentário