Skip to content

Commit

Permalink
(CI) format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero to Mastery committed Sep 4, 2023
1 parent 94aa39b commit 99cbb06
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 42 deletions.
89 changes: 60 additions & 29 deletions Art/ManishM/index.css
Original file line number Diff line number Diff line change
@@ -1,43 +1,74 @@

body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
perspective: 1000px;
background-color: #f0f0f0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
perspective: 1000px;
background-color: #f0f0f0;
}

.cube {
position: relative;
transform-style: preserve-3d;
animation: spinAndChangeColor 10s linear infinite, changeCubeColor 10s ease-in-out infinite;
position: relative;
transform-style: preserve-3d;
animation: spinAndChangeColor 10s linear infinite,
changeCubeColor 10s ease-in-out infinite;
}

.surface {
position: absolute;
width: 200px;
height: 200px;
background: transparent;
border: 2px solid #fff;
position: absolute;
width: 200px;
height: 200px;
background: transparent;
border: 2px solid #fff;
}

.surface:nth-child(1) { transform: rotateY(0deg) translateZ(100px); background-color: #3498db; }
.surface:nth-child(2) { transform: rotateY(90deg) translateZ(100px); background-color: #e74c3c; }
.surface:nth-child(3) { transform: rotateY(180deg) translateZ(100px); background-color: #2ecc71; }
.surface:nth-child(4) { transform: rotateY(-90deg) translateZ(100px); background-color: #f1c40f; }
.surface:nth-child(5) { transform: rotateX(90deg) translateZ(100px); background-color: #9b59b6; }
.surface:nth-child(6) { transform: rotateX(-90deg) translateZ(100px); background-color: #34495e; }
.surface:nth-child(1) {
transform: rotateY(0deg) translateZ(100px);
background-color: #3498db;
}
.surface:nth-child(2) {
transform: rotateY(90deg) translateZ(100px);
background-color: #e74c3c;
}
.surface:nth-child(3) {
transform: rotateY(180deg) translateZ(100px);
background-color: #2ecc71;
}
.surface:nth-child(4) {
transform: rotateY(-90deg) translateZ(100px);
background-color: #f1c40f;
}
.surface:nth-child(5) {
transform: rotateX(90deg) translateZ(100px);
background-color: #9b59b6;
}
.surface:nth-child(6) {
transform: rotateX(-90deg) translateZ(100px);
background-color: #34495e;
}

@keyframes spinAndChangeColor {
0% { transform: rotateX(0deg) rotateY(0deg); }
100% { transform: rotateX(360deg) rotateY(360deg); }
0% {
transform: rotateX(0deg) rotateY(0deg);
}
100% {
transform: rotateX(360deg) rotateY(360deg);
}
}

@keyframes changeCubeColor {
0%, 100% { background-color: #3498db; }
25% { background-color: #e74c3c; }
50% { background-color: #2ecc71; }
75% { background-color: #f1c40f; }
}
0%,
100% {
background-color: #3498db;
}
25% {
background-color: #e74c3c;
}
50% {
background-color: #2ecc71;
}
75% {
background-color: #f1c40f;
}
}
26 changes: 13 additions & 13 deletions Art/ManishM/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<!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="index.css">
</head>
<body>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="index.css" />
</head>
<body>
<div class="cube">
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
<div class="surface"></div>
</div>
</body>
</body>
</html>

!

0 comments on commit 99cbb06

Please sign in to comment.