HTML CODE:
<!DOCTYPE html>
<html>
<head>
<title>page</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<link rel="stylesheet" type="text/css" href="1.page.css">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.1/css/all.css">
</head>
<body>
<div class="center">
<div class="down"></div>
</div>
</body>
</html>
CSS CODE:
body{
margin: 0;
padding: 0;
background-color: #262626;
}
.center{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.down{
position: relative;
width: 200px;
height: 320px;
border-radius: 100px;
background-color: transparent;
border:4px solid #fff;
overflow:hidden;
}
.down:before{
content: "";
position: absolute;
width: 24px;
height: 24px;
border-radius: 50%;
background-color: #fff;
left: 50%;
top: 40px;
transform: translate(-50%,0);
animation: ani 1s linear infinite;
}
.down:after{
content: "";
position: absolute;
width: 24px;
height:60px;
border-radius: 50%;
background-color: #fff;
left: 50%;
top: 20px;
transform: translate(-50%,0);
border-radius:12px;
}
@keyframes ani{
0%{
transform: translate(-50%,80px);
opacity: 0;
}
80%{
transform: translate(-50%,240px);
opacity: 1;
}
100%{
transform: translate(-50%,400px);
}
}
Leave a comment