-
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.
Co-authored-by: Tyler Catus <catus7@yahoo.com> Co-authored-by: Sophia Brandt <16630701+sophiabrandt@users.noreply.github.com>
- Loading branch information
1 parent
d18ef11
commit 9a95dfd
Showing
4 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
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,21 @@ | ||
<!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="cube_styles.css"> | ||
<title>Document</title> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="cube"> | ||
<div class="cube_face cube_face_red"></div> | ||
<div class="cube_face cube_face_blue"></div> | ||
<div class="cube_face cube_face_green"></div> | ||
<div class="cube_face cube_face_pink"></div> | ||
<div class="cube_face cube_face_orange"></div> | ||
<div class="cube_face cube_face_purple"></div> | ||
</div> | ||
</div> | ||
</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 |
---|---|---|
@@ -0,0 +1,86 @@ | ||
body { | ||
font-family: sans-serif; | ||
margin: 0; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 100vh; | ||
background-color: #444646; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
perspective: 200px; | ||
} | ||
|
||
.cube { | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
animation: rotateCube 4s infinite linear; | ||
} | ||
|
||
|
||
@keyframes rotateCube { | ||
0%, 6% { | ||
transform: translateZ(-100px) rotateY(0deg) rotateX(0deg); | ||
} | ||
16%, 21% { | ||
transform: translateZ(-100px) rotateY(90deg) rotateX(0deg); | ||
} | ||
33%, 38% { | ||
transform: translateZ(-100px) rotateX(90deg); | ||
} | ||
47%, 52% { | ||
transform: translateZ(-100px) rotateY(180deg) rotateX(0deg); | ||
} | ||
|
||
61%, 66% { | ||
transform: translateZ(-100px) rotateX(-90deg); | ||
} | ||
76%, 80% { | ||
transform: translateZ(-100px) rotateY(270deg) rotateX(90deg); | ||
} | ||
90%, 100% { | ||
transform: translateZ(-100px) rotateY(360deg) rotateX(0deg); | ||
} | ||
} | ||
|
||
.cube_face { | ||
position: absolute; | ||
width: 200px; | ||
height: 200px; | ||
border: 3px solid black; | ||
} | ||
|
||
|
||
.cube_face_red { | ||
background: #ff00009c; | ||
transform: rotateY(0deg) translateZ(100px); | ||
} | ||
|
||
.cube_face_blue { | ||
background: #00ffff9c; | ||
transform: rotateY(90deg) translateZ(100px); | ||
} | ||
|
||
.cube_face_green { | ||
background: #00ff7f9c; | ||
transform: rotateY(180deg) translateZ(100px); | ||
} | ||
|
||
.cube_face_pink { | ||
background: #ff14939c; | ||
transform: rotateY(-90deg) translateZ(100px); | ||
} | ||
|
||
.cube_face_orange { | ||
background: #ffa5009c; | ||
transform: rotateX(90deg) translateZ(100px); | ||
} | ||
|
||
.cube_face_purple { | ||
background: #8000809c ; | ||
transform: rotateX(-90deg) translateZ(100px); | ||
} | ||
|
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