Add files via upload

This commit is contained in:
Sam 2023-05-23 17:16:51 +03:00 committed by GitHub
parent ad05d06574
commit 0527770c5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 128 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -0,0 +1,43 @@
<!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="image-container">
<span style="--i: 1">
<img src="1.jpg" />
</span>
<span style="--i: 2">
<img src="2.jpg" />
</span>
<span style="--i: 3">
<img src="3.jpg" />
</span>
<span style="--i: 4">
<img src="4.jpg" />
</span>
<span style="--i: 5">
<img src="5.jpg" />
</span>
<span style="--i: 6">
<img src="6.jpg" />
</span>
<span style="--i: 7">
<img src="7.jpg" />
</span>
<span style="--i: 8">
<img src="8.jpg" />
</span>
</div>
<div class="btn-container">
<button class="btn" id="prev">Prev</button>
<button class="btn" id="next">Next</button>
</div>
<script src="index.js"></script>
</body>
</html>

View File

@ -0,0 +1,26 @@
const imageContainerEl = document.querySelector(".image-container");
const prevEl = document.getElementById("prev");
const nextEl = document.getElementById("next");
let x = 0;
let timer;
prevEl.addEventListener("click", () => {
x = x + 45;
clearTimeout(timer);
updateGallery();
});
nextEl.addEventListener("click", () => {
x = x - 45;
clearTimeout(timer);
updateGallery();
});
function updateGallery() {
imageContainerEl.style.transform = `perspective(1000px) rotateY(${x}deg)`;
timer = setTimeout(() => {
x = x - 45;
updateGallery();
}, 3000);
}
updateGallery();

View File

@ -0,0 +1,59 @@
body {
margin: 0;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
height: 100vh;
justify-content: center;
background-color: #b6a35f;
overflow: hidden;
}
.image-container {
position: relative;
width: 200px;
height: 200px;
transform-style: preserve-3d;
transform: perspective(1000px) rotateY(0deg);
transition: transform 0.7s;
}
.image-container span {
position: absolute;
top: 0;
left: 0;
width: 100%;
transform: rotateY(calc(var(--i) * 45deg)) translateZ(400px);
}
.image-container span img {
position: absolute;
left: 0;
top: 0;
width: 200px;
height: 150px;
}
.btn-container {
position: relative;
width: 80%;
}
.btn {
position: absolute;
bottom: -80px;
background-color: #aac388;
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: .3s;
font-size: 18px;
}
.btn:hover {
filter: brightness(1.5);
color: #000;
}
#prev {
left: 20%;
}
#next {
right: 20%;
}