DenisZ,
сделайте пример с проблемой, иначе можно только гадать ...
ниже пример, что в нём не так?
<!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">
<style type="text/css">
html, body{
height: 100vh;
}
.header {
height: 100%;
background-image: url("https://wallbox.ru/resize/1600x1200/wallpapers/main/201217/zhivotnye-0ed8849af12c.jpg");
background-size: cover;
background-repeat: no-repeat;
z-index: 0;
}
.grad{
content:" ";
background-image: linear-gradient(to top, rgb(255, 255, 255) 0%, rgb(255, 255, 255) 50%, rgb(255, 255, 255) 2%, transparent 100%);
opacity: 100;
z-index: 0;
}
.test {
position: absolute;
background-image:url("https://animaljournal.ru/articles/top/interesnoe/lev_car_zverey/lev_jivet_v_savanne.jpg");
top: 0; left: 0; right: 0; bottom: 0;
background-size: 50% 50%;
background-repeat: no-repeat;
opacity: 100;
z-index: 2;
}
</style>
<title>Document</title>
</head>
<body>
<div class="header"><div class="test"></div><div class="grad"></div></div>
<div class="cont1">
<div class="cont22" ><button id="b_open">Open</button></div>
<div class="cont2">
<button id="b_close">Close</button></div>
</div>
<div id="clockDisplay" class="clockStyle"></div>
<script src="jquery-3.6.3.js"></script>
<script src="index.js"></script>
</body>
</html>