Skip to content

Commit

Permalink
Animate Background
Browse files Browse the repository at this point in the history
  • Loading branch information
ealush committed Feb 13, 2024
1 parent 680ad3d commit d4d99cb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ body {
overflow-x: hidden;
}

/* animate background position 100px and restart */

@keyframes background {
to {
background-position-y: 100%;
}
}

body {
color: rgb(var(--foreground-rgb));
background-color: var(--background-color);
Expand All @@ -44,6 +52,8 @@ body {
transparent 50%
);
background-size: 70.71px 70.71px; /* 50px * sqrt(2) to account for the 45 degree rotation */
background-position-y: 0;
animation: background 60s linear infinite;
}

a {
Expand Down

0 comments on commit d4d99cb

Please sign in to comment.