-
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 24, 2023
1 parent
729a71f
commit da3410a
Showing
3 changed files
with
207 additions
and
207 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,94 +1,93 @@ | ||
<!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>3D Pyramid</title> | ||
<style> | ||
:root { | ||
--dark-green: rgb(0, 35, 51); | ||
--light-green: #00ff84; | ||
} | ||
:root { | ||
--dark-green: rgb(0, 35, 51); | ||
--light-green: #00ff84; | ||
} | ||
|
||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 100vh; | ||
background-color: var(--dark-green); | ||
} | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
.pyramid { | ||
position: absolute; | ||
top: 10%; | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
animation: animate 4s linear infinite; | ||
} | ||
body { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 100vh; | ||
background-color: var(--dark-green); | ||
} | ||
|
||
@keyframes animate { | ||
0% { | ||
transform: rotateX(-30deg) rotateY(0deg); | ||
} | ||
.pyramid { | ||
position: absolute; | ||
top: 10%; | ||
width: 200px; | ||
height: 200px; | ||
transform-style: preserve-3d; | ||
animation: animate 4s linear infinite; | ||
} | ||
|
||
100% { | ||
transform: rotateX(-30deg) rotateY(360deg); | ||
} | ||
@keyframes animate { | ||
0% { | ||
transform: rotateX(-30deg) rotateY(0deg); | ||
} | ||
|
||
.pyramid div { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
transform-style: preserve-3d; | ||
100% { | ||
transform: rotateX(-30deg) rotateY(360deg); | ||
} | ||
} | ||
|
||
.pyramid div span { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: linear-gradient(#076e87, var(--light-green)); | ||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform: rotateY(calc(90deg * var(--i))) translateZ(99px) rotateX(30deg); | ||
transform-origin: bottom; | ||
} | ||
.pyramid div { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
transform-style: preserve-3d; | ||
} | ||
|
||
.pyramid .glow { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: var(--light-green); | ||
transform: rotateX(90deg) translateZ(-150px); | ||
filter: blur(20px); | ||
box-shadow: 0 0 500px var(--light-green); | ||
} | ||
.pyramid div span { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: linear-gradient(#076e87, var(--light-green)); | ||
clip-path: polygon(50% 0%, 0% 100%, 100% 100%); | ||
transform: rotateY(calc(90deg * var(--i))) translateZ(99px) | ||
rotateX(30deg); | ||
transform-origin: bottom; | ||
} | ||
|
||
.pyramid .glow { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: var(--light-green); | ||
transform: rotateX(90deg) translateZ(-150px); | ||
filter: blur(20px); | ||
box-shadow: 0 0 500px var(--light-green); | ||
} | ||
</style> | ||
</head> | ||
</head> | ||
|
||
<body> | ||
<body> | ||
<div class="pyramid"> | ||
<div class="glow"></div> | ||
<div> | ||
<span style="--i: 0"></span> | ||
<span style="--i: 1"></span> | ||
<span style="--i: 2"></span> | ||
<span style="--i: 3"></span> | ||
</div> | ||
<div class="glow"></div> | ||
<div> | ||
<span style="--i: 0"></span> | ||
<span style="--i: 1"></span> | ||
<span style="--i: 2"></span> | ||
<span style="--i: 3"></span> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
</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,25 +1,25 @@ | ||
<!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"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<link rel="stylesheet" href="style.css" /> | ||
<title>Mouse Pure CSS</title> | ||
</head> | ||
<body> | ||
</head> | ||
<body> | ||
<div class="main"> | ||
<div class="head"> | ||
<div class="eye1"></div> | ||
<div class="eye2"></div> | ||
<div class="eye3"></div> | ||
<div class="eye4"></div> | ||
<div class="nose"></div> | ||
</div> | ||
<div class="ear1"></div> | ||
<div class="ear2"></div> | ||
<div class="ear3"></div> | ||
<div class="ear4"></div> | ||
<div class="mouth"></div> | ||
<div class="head"> | ||
<div class="eye1"></div> | ||
<div class="eye2"></div> | ||
<div class="eye3"></div> | ||
<div class="eye4"></div> | ||
<div class="nose"></div> | ||
</div> | ||
<div class="ear1"></div> | ||
<div class="ear2"></div> | ||
<div class="ear3"></div> | ||
<div class="ear4"></div> | ||
<div class="mouth"></div> | ||
</div> | ||
</body> | ||
</html> | ||
</body> | ||
</html> |
Oops, something went wrong.