Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added rotating_box/image/img 1 (1).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rotating_box/image/img 1 (2).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rotating_box/image/img 1 (3).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rotating_box/image/img 1 (4).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added rotating_box/image/topimg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions rotating_box/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<div class="cube">
<div class="top "><img class="image01" src="./image/topimg.png" alt=""></div>
<div>
<span style="--i:0;"><img src="./image/img 1 (1).jpg" class="image01" alt=""></span>
<span style="--i:1;"><img src="./image/img 1 (2).jpg" class="image01" alt=""></span>
<span style="--i:2;"><img src="./image/img 1 (3).jpg" class="image01" alt=""></span>
<span style="--i:3;"><img src="./image/img 1 (4).jpg" class="image01" alt=""></span>
</div>
</div>

</body>
</html>
74 changes: 74 additions & 0 deletions rotating_box/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
*{
margin: 0;
padding: 0%;
box-sizing: border-box;
}
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #050505;
}
.cube{
position: relative;
width: 300px;
height: 300px;
transform-style: preserve-3d;
transform: rotateX(-30deg);
animation: animate 10s linear infinite;
}
@keyframes animate{
0%{
transform: rotateX(-30deg) rotateY(0deg);
}
100%{
transform: rotateX(-30deg) rotateY(360deg);
}
}
.cube div{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
transform-style: preserve-3d;
}
.cube div span{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(#151515,#00ec00);
transform: rotateY(calc(90deg * var(--i))) translateZ(150px);
}
.top{
position: absolute;
top: 0;
left: 0;
width: 300px;
height: 300px;
background:#222;
transform: rotateX(90deg) translateZ(150px);
}
.top::before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 300px;
height: 300px;
background: #0f0;
transform: translateZ(-380px);
filter: blur(20px);
box-shadow: 0 0 120px rgba(0, 255, 0, 0.2),
0 0 200px rgba(0, 255, 0, 0.4),
0 0 300px rgba(0, 255, 0, 0.6),
0 0 400px rgba(0, 255, 0, 0.8),
0 0 500px rgba(0, 255, 0, 1);
}
.image01{
height: 100%;
width: 100%;
}