Здравствуйте!
Вопрос частично решен
<!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 {
width: cover;
height: 100%;
position: relative;
background-image: url("https://wallbox.ru/resize/1600x1200/wallpapers/main/201217/zhivotnye-0ed8849af12c.jpg");
background-size: cover;
background-repeat: no-repeat;
z-index: 0;
}
.header::after{
height: auto;
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
content:" ";
background-image: linear-gradient(to top, rgb(255, 255, 255), rgb(255, 255, 255), rgba(255, 255, 255, 0.52), transparent 110%);
opacity: 100;
}
.test {
width: 78%;
height: auto;
position: absolute;
margin-left: 11%;
margin-top: 7%;
text-align: center;
opacity: 100;
z-index: 1;
}
.cont1{
position: absolute;
width: 78%;
height: 10%;
margin-top: 2%;
margin-left: 11%;
background-color: rgba(240, 165, 2, 0.556);
display:inline-flex;
flex-direction: row;
align-items: center;
justify-content:space-around;
z-index: 32;
}
.img{
position: relative;
width: 100%;
height: auto;
z-index: 2;
}
#clockDisplay{
margin:0px auto;
width: 400px;
position: absolute;
margin-top: -52%;
margin-left: 67%;
background-color: #411b07b6;
border: 2px solid #ecb941;
box-shadow: 0 10px 10px rgba(212, 66, 26, 0.2);
height: 100px;
color: #fff7e8;
padding-top: 30px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size:60px;
text-align: center;
letter-spacing: 2px;
z-index: 54;
}
#b_open{
height: 30px;
cursor: pointer;
font-weight: 800;
font-size: large;
background-color: #ffffff00;
color:rgb(255, 255, 255);
border: none;
}
</style>
<title>Document</title>
</head>
<body>
<div class="header">
<div class="test">
<img class="img" src="https://animaljournal.ru/articles/top/interesnoe/lev_car_zverey/lev_jivet_v_savanne.jpg">
<div id="clockDisplay"></div>
</div>
<div class="cont1">
<div class="cont22" ><button id="b_open">Open</button></div>
<div class="cont2">
<button id="b_open">Close</button></div>
<div class="cont22" ><button id="b_open">Enter</button></div>
<div class="cont2">
<button id="b_open">Save</button></div>
</div>
<script >
function renderTime(){
let currentTime = new Date();
let h = currentTime.getHours();
let m = currentTime.getMinutes();
let s = currentTime.getSeconds();
let diem = "AM";
if(h < 10){
h = "0" + h;
}
if(m < 10){
m = "0" + m;
}
if(s < 10){
s = "0" + s;
}
let myClock = document.getElementById('clockDisplay');
myClock.textContent = h + ":" + m + ":" + s;
setTimeout('renderTime()', 1000);
}
renderTime();
</script>
</body>
</html>
Теперь другой вопрос: что можно сделать, чтобы картинка с градиентом занимала весь фон? Можно через body, но тогда псевдоэффект накладывается на основной контент...