1
Good morning, good afternoon, good evening.
I’m having trouble using the transform: scale(1.7)
in the div:hover
, Every time I step the mouse, the div
increases, but the one on the side is in front of him, as I can do for this q passed the mouse stay in front?
That is the code:
<!DOCTYPE html>
<html>
<head>
<style>
div{background-color: red;
position: relative;
width: 100px;
height: 70px;
margin: 2% 1%;
display: inline-block;
transition: all 0.1s;}
div:nth-child(2){background-color: blue}
div:nth-child(3){background-color: green}
div:nth-child(4){background-color: yellow}
div:nth-child(5){background-color: black}
div:hover{transform: scale(1.7)}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
if you do not transition with appropriate values in the z-index, when taking out the Hover the div will cross the other - for example, do the Hover in the green and take the Pointer from the top, looking yellow to view. (specify a low z-index in the div without Hover to solve) - taking advantage, it pays to edit and leave the spelling of the z-index in minuscula.
– Bacco