-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zero to Mastery
committed
Oct 2, 2023
1 parent
b7c2897
commit dea0c2d
Showing
2 changed files
with
98 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Bouncing Screensaver</title> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
</head> | ||
<body> | ||
<link rel="stylesheet" type="text/css" href="style.css" /> | ||
</head> | ||
<body> | ||
<div class="bg-gradient"></div> | ||
<div class="el-wrap x"><b></b></div> | ||
<img class="el y" src="https://github.com/avatars/u/35373879?s=200&v=4" alt="ZTM Logo"> | ||
</body> | ||
</html> | ||
<img | ||
class="el y" | ||
src="https://github.com/avatars/u/35373879?s=200&v=4" | ||
alt="ZTM Logo" | ||
/> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,105 @@ | ||
html, body { | ||
margin: 0; | ||
padding: 0; | ||
html, | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
.bg-gradient { | ||
height: 100vh; | ||
width: 100%; | ||
background-image: linear-gradient(#e7266c, #2ac075); | ||
height: 100vh; | ||
width: 100%; | ||
background-image: linear-gradient(#e7266c, #2ac075); | ||
} | ||
|
||
:root { | ||
--width: 300px; | ||
--x-speed: 13s; | ||
--y-speed: 7s; | ||
--transition-speed: 2.2s; | ||
--width: 300px; | ||
--x-speed: 13s; | ||
--y-speed: 7s; | ||
--transition-speed: 2.2s; | ||
} | ||
|
||
var { | ||
width: var(--width); | ||
height: var(--width); | ||
width: var(--width); | ||
height: var(--width); | ||
} | ||
|
||
img { | ||
display: block; | ||
width: 100px; | ||
height: 100px; | ||
border-radius: 50%; | ||
position: absolute; | ||
|
||
-webkit-animation: moveX 8s linear 0s infinite alternate, moveY 7.6s linear 0s infinite alternate; | ||
-moz-animation: moveX 8s linear 0s infinite alternate, moveY 7.6s linear 0s infinite alternate; | ||
-o-animation: moveX 8s linear 0s infinite alternate, moveY 7.6s linear 0s infinite alternate; | ||
animation: moveX 8s linear 0s infinite alternate, moveY 7.6s linear 0s infinite alternate; | ||
} | ||
img { | ||
display: block; | ||
width: 100px; | ||
height: 100px; | ||
border-radius: 50%; | ||
position: absolute; | ||
|
||
-webkit-animation: moveX 8s linear 0s infinite alternate, | ||
moveY 7.6s linear 0s infinite alternate; | ||
-moz-animation: moveX 8s linear 0s infinite alternate, | ||
moveY 7.6s linear 0s infinite alternate; | ||
-o-animation: moveX 8s linear 0s infinite alternate, | ||
moveY 7.6s linear 0s infinite alternate; | ||
animation: moveX 8s linear 0s infinite alternate, | ||
moveY 7.6s linear 0s infinite alternate; | ||
} | ||
|
||
@-webkit-keyframes moveX { | ||
from { left: calc(100% - 100px); } to { left: 0; } | ||
@-webkit-keyframes moveX { | ||
from { | ||
left: calc(100% - 100px); | ||
} | ||
to { | ||
left: 0; | ||
} | ||
} | ||
@-moz-keyframes moveX { | ||
from { | ||
left: calc(100% - 100px); | ||
} | ||
to { | ||
left: 0; | ||
} | ||
} | ||
@-o-keyframes moveX { | ||
from { | ||
left: calc(100% - 100px); | ||
} | ||
to { | ||
left: 0; | ||
} | ||
@-moz-keyframes moveX { | ||
from { left: calc(100% - 100px); } to { left: 0; } | ||
} | ||
@keyframes moveX { | ||
from { | ||
left: calc(100% - 100px); | ||
} | ||
to { | ||
left: 0; | ||
} | ||
} | ||
@-webkit-keyframes moveY { | ||
from { | ||
top: 0; | ||
} | ||
to { | ||
top: calc(100% - 100px); | ||
} | ||
@-o-keyframes moveX { | ||
from { left: calc(100% - 100px); } to { left: 0; } | ||
} | ||
@-moz-keyframes moveY { | ||
from { | ||
top: 0; | ||
} | ||
@keyframes moveX { | ||
from { left: calc(100% - 100px); } to { left: 0; } | ||
to { | ||
top: calc(100% - 100px); | ||
} | ||
@-webkit-keyframes moveY { | ||
from { top: 0; } to { top: calc(100% - 100px); } | ||
} | ||
@-o-keyframes moveY { | ||
from { | ||
top: 0; | ||
} | ||
@-moz-keyframes moveY { | ||
from { top: 0; } to { top: calc(100% - 100px); } | ||
to { | ||
top: calc(100% - 100px); | ||
} | ||
@-o-keyframes moveY { | ||
from { top: 0; } to { top: calc(100% - 100px); } | ||
} | ||
@keyframes moveY { | ||
from { | ||
top: 0; | ||
} | ||
@keyframes moveY { | ||
from { top: 0; } to { top: calc(100% - 100px); } | ||
} | ||
to { | ||
top: calc(100% - 100px); | ||
} | ||
} |