Fine tuning a modal image – HTML & CSS – SitePoint

web148

August 29, 2022, 3:01pm
#1

I have found this code, working and quite fitting with my aims. But I would fix the movement towar…….

npressfetimg-3232.png


internet148

August 29, 2022, 3:01pm
#1

I’ve found this code, working and pretty matchting with my goals. However I might repair the movement in the direction of The underside: It is not needed, nor good to go “to the hell” (I imply under the display). It Might be enough a narrower movement.
This the code:

<html>
<head>
<type>
.modal {
z-index:1;
current:none;
padding-prime:10px;
place:repaired;
left:0;
prime:0;
width:100%;
peak:100%;
overflow:auto;
background-colour:rgb(0,0,0);
background-colour:rgba(0,0,0,0.2)
}

.modal-content material{
margin: auto;
current: block;
place: absolute;
prime: 50%;
left: 50%;
rework: translate(-50%, -50%);
}

.modal-hover-opacity {
opacity:1;
filter:alpha(opacity=100);
-internetkit-backface-visibility:hidden
}

.modal-hover-opacity:hover {
opacity:0.60;
filter:alpha(opacity=60);
-internetkit-backface-visibility:hidden
}

.shut {
textual content material-ornament:none;
float:proper;
font-measurement:24px;
font-weight:daring;
colour:white;
}
.includeer1 {
width:200px;
current:inline-block;
}
.modal-content material, #caption {
-internetkit-animation-identify: zoom;
-internetkit-animation-interval: 0.6s;
animation-identify: zoom;
animation-interval: 0.6s;
}

@-internetkit-keyphysiques zoom {
from {-internetkit-rework:scale(0.5)}
to {-internetkit-rework:scale(1)}
}

@keyphysiques zoom {
from {rework:scale(0.5)}
to {rework:scale(1)}
}
</type>
</head>
<physique>
<div class="includeer1">
<img src="https://pictures-na.ssl-pictures-amazon.com/pictures/M/MV5BMTczNTI2ODUwOF5BMl5BanBnXkFtZTcwMTU0NTIzMw@@._V1_SY1000_CR0,0,674,1000_AL_.jpg" type="max-width:100%;cursor:pointer"
onclick="onClick(this)" class="modal-hover-opacity">
</div>
<div class="includeer1">
<img src="https://pictures-na.ssl-pictures-amazon.com/pictures/M/MV5BMTUyNzk3MjA1OF5BMl5BanBnXkFtZTcwMTE1Njg2MQ@@._V1_SY1000_CR0,0,674,1000_AL_.jpg" type="max-width:100%;cursor:pointer"
onclick="onClick(this)" class="modal-hover-opacity">
</div>
<div class="includeer1">
<.......

Source: https://news.google.com/__i/rss/rd/articles/CBMiRmh0dHBzOi8vd3d3LnNpdGVwb2ludC5jb20vY29tbXVuaXR5L3QvZmluZS10dW5pbmctYS1tb2RhbC1pbWFnZS8zOTQ3NjnSAQA?oc=5