Add files via upload

This commit is contained in:
Sam 2023-03-30 03:12:35 +03:00 committed by GitHub
parent ccb76145e8
commit 3d9cddce40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 101 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 391 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 428 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 785 KiB

View File

@ -0,0 +1,21 @@
<!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">
<link rel="stylesheet" href="all.css">
</head>
<body>
<div class="img">
<a class="btn btn-left"></a>
<a class="btn btn-right"></a>
</div>
<script src="main.js"></script>
</body>
</html>

View File

@ -0,0 +1,35 @@
(function () {
const pictures = [
'1',
'2',
'3',
'4',
'5',
'6',
'7'
];
const buttons = document.querySelectorAll('.btn');
const imgDiv = document.querySelector('.img');
let counter = 0
buttons.forEach(function (button) {
button.addEventListener("click", function (e) {
if (button.classList.contains('btn-left')){
counter--
if (counter < 0){
counter = pictures.length - 1
}
imgDiv.style.backgroundImage = `url('./img/${pictures[counter]}.jpg')`
}
if (button.classList.contains('btn-right')){
counter--
if (counter < 0){
counter = pictures.length - 1
}
imgDiv.style.backgroundImage = `url('./img/${pictures[counter]}.jpg')`
}
})
})
}) ();

View File

@ -0,0 +1 @@
https://www.youtube.com/watch?v=sxq-https://www.youtube.com/watch?v=sxq-8qv2i1Q&list=PL9bD98LkBR7P16BndaNtP4x6Wf5Ib85Hm&index=7&ab_channel=Tech2etc

View File

@ -0,0 +1,44 @@
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
body{
background:linear-gradient(to right, #D4D3DD, #EFEFBB);
}
.img{
width: 60%;
height: 80vh;
background-image: url("./img/1.jpg");
background-position: center;
background-repeat: no-repeat;
background-size: cover;
position: relative;
margin: 30px auto;
}
.btn-left{
position: absolute;
top: 50%;
left: 0;
color: #fff;
transform: translate(-50%, -50%);
font-size: 1.5rem;
padding: 15px;
border-radius: 11px;
text-align: center;
backdrop-filter: blur(5px);
cursor: pointer;
}
.btn-right{
position: absolute;
top: 50%;
right:-35px;
color: #fff;
transform: translate(-50%, -50%);
font-size: 1.5rem;
padding: 15px;
border-radius: 11px;
text-align: center;
backdrop-filter: blur(5px);
cursor: pointer;
}