Good I do not understand because I figure the background image when doing onclick in an image is as if the opacity is giving me in both photos. This is the div that contains the image
<div class="imgs" id="imgs"><img src="img/24.jpg" width="100%" height="100%" class="image" alt="img1" onClick="imgvis(1)" id="image"/></div>
and this is the function when doing onclick
var src = document.getElementById("image").src;
document.getElementById("divhidden").style.visibility="visible";
document.getElementById("backimg").src=src;
and this div that contains the image that opens
<div class="container2" id="divhidden" style="height: 963px;" onClick="imgvis(0)">
<figure class="figure">
<img width="100%" height="100%" id="backimg">
</figure>
CSS
/*DIV que contiene image*/
.imgs:hover {
width: 25%;
border: 1px solid #FFFFFF;
height: 557px;
background-size: 100% 100%;
background-repeat: no-repeat;
float: left;
background-color: orangered;
}
/*imagen*/
.image:hover{
opacity: 0.8;
cursor: zoom-in;
}
/*Figure*/
.figure{
width: 30%;
text-align: center;
position: fixed;
}
/* container 2 que contiene figure y imagen a mostrar al hacer click*/
.container2{
width: 100%;
height: 100%;
position: absolute;
align-items: center;
background: rgba(0,0,0,0.4);
visibility: hidden;
cursor: zoom-out;
}
Looks like this when taking the pointer out of the image, it looks good