Skip to content

Commit

Permalink
Merge pull request #2729 from BYT-Bender/BYT-Bender-square-loader
Browse files Browse the repository at this point in the history
BYT-Bender square-loader
  • Loading branch information
cadegore authored Oct 12, 2024
2 parents 03fad24 + 66f1188 commit 847f93e
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Art/BYT-Bender-square-loader/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main class="container">
<div class="loader"></div>
</main>
</body>
</html>
4 changes: 4 additions & 0 deletions Art/BYT-Bender-square-loader/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"artName": "Square Loader",
"githubHandle": "BYT-Bender"
}
93 changes: 93 additions & 0 deletions Art/BYT-Bender-square-loader/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
**, *::before, *::after {
box-sizing: border-box;
}

* {
margin: 0;
padding: 0;
}

:root {
--color: white;
--size-square: 3vmin;
}

html, body {
height: 100vh;
width: 100vw;
}

body {
display: flex;
background: rgb(81,0,255);
background: linear-gradient(90deg, rgba(81,0,255,1) 0%, rgba(166,0,255,1) 35%, rgba(243,0,255,1) 100%);
}

.container {
height: 100%;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
}

.loader {
position: relative;
}

.loader::before,
.loader::after {
content: '';
position: absolute;
width: var(--size-square);
height: var(--size-square);
background-color: var(--color);
}

.loader::before {
top: calc(50% - var(--size-square));
left: calc(50% - var(--size-square));
animation: loader-1 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite;
}

.loader::after {
top: 50%;
left: 50%;
animation: loader-2 2.4s cubic-bezier(0, 0, 0.24, 1.21) infinite;
}

@keyframes loader-1 {
0%, 100% {
transform: none;
}

25% {
transform: translateX(100%);
}

50% {
transform: translateX(100%) translateY(100%);
}

75% {
transform: translateY(100%);
}
}

@keyframes loader-2 {
0%, 100% {
transform: none;
}

25% {
transform: translateX(-100%);
}

50% {
transform: translateX(-100%) translateY(-100%);
}

75% {
transform: translateY(-100%);
}
}

0 comments on commit 847f93e

Please sign in to comment.