With a basic technique of overlapping, I did some tests and will post my conclusions/opinions at the end.
Since I don’t have the source code, I created the following code:
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
* {
margin:0;
padding:0;
border:0;
max-width:100%;
border-spacing: 0;
}
html, body {
width: 100%;
height: 100%;
}
div.dvMae {
border: solid 1px red;
width: 90%;
min-height: 70%;
margin: 20px auto 0 auto;
padding: 50px;
background: url('img/teste1.png'); /* SOMENTE PARA TESTE / NO CÓDIGO ORIGINAL PODE APAGAR */
position: relative;
}
div.dvFilho {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: url('img/teste2.png'); /* CAMINHO DA IMAGEM COM OS TÚNEIS */
background-size: 100% auto;
background-repeat: no-repeat;
background-position:50% -2000px;
opacity: 0.5;
}
</style>
</head>
<body>
<div class="dvMae">
Fubá
<div class="dvFilho">
</div>
</div>
</body>
</html>
With this code, I’ve reached this position:
Note that I added a background brown to its original image for better visualization in development.
Considerations:
- The above code is for instruction/guidance purposes. Adapt it according to your need;
- The original image is with resolution of
8000 x 14450
pixels and only have elements from the pixel 6214
(upright (y
)). On a device with screen 4k, the resolution is to 3840 × 2160
pixels. Which concludes that your image is absurdly large.
- Recreate the image with the tunnels considering the size of the target to be superimposed.
- Consider different resolutions, since your page can be visited on different devices. You know the responsive designer?
PS: I was trying to access this question by App Stack Exchange, on my cell phone with S. O. Android and the App couldn’t handle processing the image, causing its instant closure.
I don’t know if I got it right, but come on. You want the picture with these obar blue stay over the tracks? If so, ever tried to put a
div
withposition: fixed
or tried to put az-index: 99999
? Already stopped to think about the dimensioning of the project in different clients?– LipESprY
I used a div but with z-index: 11. I will try
– Alexandre Seabra
The image doesn’t even appear and should appear
– Alexandre Seabra
Blz, but it’s no use you simply change the z-index. Vc should position the image as well. I even quoted the
position: fixed
, but I believe you should use theposition: absolute
orposition: relative
, otherwise the image will be in the same place on the screen when scrolling the page. In the case ofrelative
, place inside the div with the rail. Tip: Use a different image for positioning. But with the same dimension! This image makes positioning difficult.– LipESprY
ok I’ll try thank you
– Alexandre Seabra
Post the source code that try help you if necessary.
– LipESprY