day 23 completed

pull/109/head
couldntfindabetterusername 4 years ago
parent 75e54ae6a4
commit bc6d943f79

@ -0,0 +1,24 @@
<!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>23 kinetic loader</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="triangle" id="one"></div>
<div class="triangle" id="two"></div>
</div>
<script src="script.js"></script>
</body>
</html>

@ -0,0 +1,8 @@
const one = document.getElementById("one");
const two = document.getElementById("two");
while (1) {
setTimeout(() => {
one.classList.add();
}, 2000);
}

@ -0,0 +1,67 @@
* {
margin: 0;
padding: 0;
}
body {
background-color: cornflowerblue;
height: 100vh;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.container {
width: 100px;
height: 100px;
position: relative;
}
.triangle {
width: 50px;
height: 100px;
clip-path: polygon(0 0, 100% 50%, 0 100%);
background-color: #fff;
position: absolute;
transform-origin: 100% 50%;
}
#one {
top: 0;
left: 0;
animation: rotate1 2s linear infinite 0.5s;
}
#two {
transform: rotate(-90deg);
/* animation: rotate1 2s linear infinite; */
}
@keyframes rotate1 {
0%,
25% {
transform: rotate(0deg);
}
50% {
transform: rotate(90deg);
}
75%,
100% {
transform: rotate(180deg);
}
}
@keyframes rotate2 {
0%,
25% {
transform: rotate(-90deg);
}
50% {
transform: rotate(90deg);
}
75%,
100% {
transform: rotate(270deg);
}
}
Loading…
Cancel
Save