2
I am developing a site with CSS and HTML, but I face a problem.
I have a part of this site as a kind of gallery, and when an image gets hover
, it gets bigger. The problem is that it stays under the others, as in the print at the end of the post.
/* Grow */
.hvr-grow-shadow {
display: inline-block;
vertical-align: middle;
-webkit-transform: translateZ(0);
transform: translateZ(0);
box-shadow: 0 0 1px rgba(0, 0, 0, 0);
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-moz-osx-font-smoothing: grayscale;
-webkit-transition-duration: 0.3s;
transition-duration: 0.3s;
-webkit-transition-property: transform;
transition-property: transform;
position: relative;
}
.hvr-grow-shadow:hover, .hvr-grow-shadow:focus, .hvr-grow-shadow:active {
-webkit-transform: scale(1.8);
transform: scale(1.8);
position: relative;
}
CSS:
<center><img class="hvr-grow-shadow" src="img/thumbs/asun.png" style="margin-left:2%;'">
<img class="hvr-grow-shadow" src="img/thumbs/bigode.png" style="margin-left:2%;">
<img class="hvr-grow-shadow" src="img/thumbs/bradesco.png" style="margin-left:2%;"></center>
<br>
<center><img class="hvr-grow-shadow" src="img/thumbs/parobe.png" style="margin-left:2%;">
<img class="hvr-grow-shadow" src="img/teste3.png" style="margin-left:2%;">
<img class="hvr-grow-shadow" src="img/teste3.png" style="margin-left:2%;"></center>
Upshot:
Unsuccessful friend.
– MucaP
Here it worked without
z-index
and with.– Diego Souza
I’m with Chrome in windows 10, unsuccessful. Continue down
– MucaP
Those 200x200 squares you drew there is what ?
– Diego Souza
Just because I didn’t have anything to put on.
– MucaP
Class name is not matching the class name in the image.
– Diego Souza
Where? In what part?
– MucaP
Class name in CSS
hvr-grow
. Class name on tagimg
=>hvr-grow-shadow
.– Diego Souza
Really, but even so I added in hvr-Grow-shadow and it didn’t work the same
– MucaP
https://jsfiddle.net/q3xm2tv0/
– Diego Souza
I resolved adding position: Absolute; and z-index: 10; no hvr-Grow-shadow.
– MucaP
Your code is not working @Zoom -> https://jsfiddle.net/q3xm2tv0/1/ I set the edges.
– celsomtrindade
@Mucap see my answer.
– celsomtrindade
Dude, but you put the
z-index: 10;
that I said ? I put it here and it worked. Look... https://jsfiddle.net/q3xm2tv0/2/– Diego Souza
@Celsomtrindade, your answer is the same as mine, has changed absolutely nothing...
– Diego Souza
@Zoom the explanation was different and your fiddle didn’t work.
– celsomtrindade