let html = document.querySelector("html")
document.querySelector(".nav__burger-btn").onclick = function(){
html.classList.toggle("unscroll")
}
.unscroll{
overflow:hidden;
}
<ul class="list">
<li>Елемент 1</li>
<li>Елемент 2</li>
<li>Елемент 3</li>
</ul>
.list li{
list-style:none;
}
<!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>
</head>
<body>
<div class="bg"></div>
</body>
<style>
.bg{
background: url("https://centr-plyazhnogo-voleybolu.netlify.app/photo-header.jpg");
width: 300px;
height: 300px;
background-size: cover;
}
</style>
<script>
let preview = document.querySelector(".bg")
preview.onclick = function(){
preview.style.backgroundImage = "url('https://centr-plyazhnogo-voleybolu.netlify.app/img11.jpg')"
}
</script>
</html>
<!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>
</head>
<body>
<div class="bg">
<div class="inner"><h1>Heading</h1><p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Odio, perspiciatis nobis tempore deserunt iusto delectus alias sunt at quo aut molestias possimus cum numquam rerum pariatur quis ab ut quasi!</p></div>
</div>
</body>
<style>
.bg{
width: 900px;
display: flex;
justify-content: center;
align-items: center;
height: 600px;
background: url(https://img.freepik.com/free-vector/spring-landscape-scene_52683-56331.jpg?t=st=1676042552~exp=1676043152~hmac=a344e4dbe3e47487bf10ec2aa6bef3ea1bc3b4e23a68ef595ea082d4ea17755f);
background-repeat: no-repeat;
background-size: cover;
}
.inner{
width: 100%;
color: white;
height: 100%;
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
/*Затемнение*/ backdrop-filter: brightness(50%);
}
</style>
</html>
<!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>
</head>
<body>
<div class="header"><p>Меню</p></div>
</body>
<style>
.header{
width: 100%;
height: 80px;
transition-duration: 1s;
z-index: 2;
position: fixed;
background: rgba(0, 0, 0, 0);
}
body{
min-height: 2000px;
}
</style>
<script>
let header = document.querySelector(".header")
window.onscroll = function(){
if(window.scrollY > 100){
header.style.background = "#000"
}
else{
header.style.background = "rgba(0, 0, 0, 0)"
}
}
</script>
</html>
<!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>
</head>
<body>
<div class="background">
<div></div>
</div>
</body>
<style>
.background div{
background:linear-gradient(to bottom, rgba(0,0,0,.0), rgba(255, 0, 0, 0.716));
width: 100%;
height: 100%;
}
.background{
width: 300px;
height: 500px;
background:url(Рандом картинка);
background-size: cover;
}
</style>
</html>