-
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.
* Create Earth.html * Add files via upload * Update include.js * Update include.js * fix syntax error in include.js --------- Co-authored-by: Sophia Brandt <16630701+sophiabrandt@users.noreply.github.com>
- Loading branch information
1 parent
cec6931
commit 29fc08e
Showing
4 changed files
with
71 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" href="style.css"> | ||
<title>Earth Revolving Around the Sun</title> | ||
</head> | ||
<body> | ||
<div class="solar-system"> | ||
<div class="sun"> | ||
<div class="earth"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
body { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100vh; | ||
margin: 0; | ||
background-color: #000; | ||
perspective: 1000px; | ||
} | ||
|
||
.solar-system { | ||
width: 200px; | ||
height: 200px; | ||
position: relative; | ||
transform-style: preserve-3d; | ||
animation: rotateEarth 10s linear infinite; | ||
} | ||
|
||
.sun { | ||
width: 100px; | ||
height: 100px; | ||
background: radial-gradient(circle, #ffdb4d, transparent); | ||
border-radius: 50%; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
} | ||
|
||
.earth { | ||
width: 30px; | ||
height: 30px; | ||
background: #0b24fb; | ||
border-radius: 50%; | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%) translateX(150px); | ||
} | ||
|
||
@keyframes rotateEarth { | ||
0% { | ||
transform: translate(-50%, -50%) translateX(150px) rotate(0deg); | ||
} | ||
100% { | ||
transform: translate(-50%, -50%) translateX(150px) rotate(360deg); | ||
} | ||
} |
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