This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #467 from Bravo773/bravo
adding my artsyness to the project
- Loading branch information
Showing
4 changed files
with
106 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,21 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Rotating 3D Cube</title> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="cube"> | ||
<div class="face top"></div> | ||
<div class="face bottom"></div> | ||
<div class="face left"></div> | ||
<div class="face right"></div> | ||
<div class="face front"></div> | ||
<div class="face back"></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,78 @@ | ||
.container { | ||
width: 200px; | ||
height: 200px; | ||
perspective: 500px; | ||
margin: 100px; | ||
} | ||
|
||
.cube { | ||
position: relative; | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
} | ||
|
||
.face { | ||
width: 200px; | ||
height: 200px; | ||
background: white; | ||
border: 2px solid black; | ||
position: absolute; | ||
opacity: 0.8; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
font-family: Arial, sans-serif; | ||
font-size: 2rem; | ||
} | ||
|
||
.cube { | ||
position: relative; | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
transform: rotate3d(1, 1, 0, 45deg); | ||
} | ||
|
||
.front { | ||
background-color: red; | ||
transform: translateZ(100px); | ||
} | ||
|
||
.back { | ||
background-color: blueviolet; | ||
transform: translateZ(-100px) rotateY(180deg); | ||
} | ||
|
||
.left { | ||
background-color: aqua; | ||
transform: translateX(-100px) rotateY(-90deg); | ||
} | ||
|
||
.right { | ||
background-color: blue; | ||
transform: translateX(100px) rotateY(90deg); | ||
} | ||
|
||
.top { | ||
background-color: purple; | ||
transform: translateY(-100px) rotateX(90deg); | ||
} | ||
|
||
.bottom { | ||
background-color: lawngreen; | ||
transform: translateY(100px) rotateX(-90deg); | ||
} | ||
|
||
@keyframes turn { | ||
from { transform: rotate3d(0, 0, 0, 0); } | ||
to { transform: rotate3d(1, 1, 0, 360deg); } | ||
} | ||
|
||
.cube { | ||
position: relative; | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
animation: turn 5s linear infinite; | ||
} |
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