<!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">
<meta http-equiv="refresh" content="3">
<title>Document</title>
</head>
<style>
body{
margin: 0;
padding: 0;
}
.animation{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.ball{
width: 50px;
border-top: 25px solid black;
border-bottom: 25px solid black;
border-radius: 50%;
animation: animate 1s linear infinite;
}
@keyframes animate{
0%{
transform: translateY(0) rotate(0);
}
50%{
transform: translateY(-200px) rotate(180deg);
}
100%{
transform: translateY(0) rotate(360);
}
}
.shadow{
position: absolute;
top: 40px;
left: 0;
width: 50px;
height: 10px;
background: #262626;
border-radius: 50%;
opacity: .8;
animation: shadow 1s linear infinite;
}
@keyframes shadow{ /*SOMBREAMENTO*/
0%{
transform: scale(1);
}
50%{
transform: scale(.5);
}
100%{
transform: scale(1);
}
}
</style>
<body>
<div class="animation">
<div class="ball"></div>
<div class="shadow"></div>
</div>
</body>
</html>
Nenhum comentário:
Postar um comentário