1
would like to expand an image when passing the mouse without the others moving.
nav#foto ul li{
display:inline-block;
margin-left:30px;
margin-top:55px;
text-align: center;
box-shadow: 2px 2px 10px rgba(0,0,0,.3);
background-color:rgb(248,248,248);
}
nav#foto li:hover{
width:50px;
height:40px;
background:white;
box-shadow: 2px 2px 20px rgba(0,0,0,.5);
}
<nav id="foto">
<ul>
<li id ="imagem1"><a href=""><img src="foto/foto1.jpeg"></a></li>
<li id ="imagem2"><a href=""><img src="foto/foto2.jpeg"></a></li>
<li id ="imagem3"><a href=""><img src="foto/foto3.jpeg"></a></li>
<li id ="imagem4"><a href=""><img src="foto/foto4.jpeg"></a></li>
</ul>
</nav>
I hadn’t really thought about it, it’s a really good method.
– Inkeliz
What can be problematic is that because images with different sizes will give a strange effect, expanding more or less than the others. E it would be necessary to work with the margins or overflow to not let the images exceed the screen, but in both ways this is necessary.
– Pliavi