Есть код и он не работает.
Точнее, элементы с "z-index" равным минус один, не располагаются за элементами с "z-index" равным плюс один.
Вот текст кода:<!DOCTYPE html>
<html>
<head>
<style>
#fon {
background: url("fon.png") no-repeat top / 100% 100%;
width: 100%; height: 100vh; position: relative; z-index: 0;
}
#main-img {
background: url("mainimg.png") no-repeat top / 100% 100%;
width: 100%; height: 100vh; position: absolute; z-index: 1;
}
#child-img-left {
background: url("childimgleft.png") no-repeat top / 100% 100%;
width: 100%; height: 100vh; position: absolute; z-index: -1;
}
#child-img-right {
background: url("childimgright.png") no-repeat top / 100% 100%;
width: 100%; height: 100vh; position: absolute; z-index: -1;
}
</style>
</head>
<body style="margin:0;">
<div id="fon">
<div id="main-img">
<div id="child-img-left"></div>
<div id="child-img-right"></div>
</div>
</div>
</body>
</html>