JEVN-MVRC• 160
@Jean-Marc18
Posted
Hello Cesjhoan Feliu 👋. Congratulations on successfully completing the challenge! 🎉 I have other recommendations regarding your code that I believe will be of great interest to you.
HTML 🏷️: to get a better result you can do this (I deleted the picture tag) :
<div class="content-img">
<img src="./images/image-equilibrium.jpg" alt="">
<div class="hover">
<img src="./images/icon-view.svg" alt="">
</div>
</div>
CSS 🎨:
.content-img{
position : relative;
}
.hover {
display: flex;
align-items: center;
justify-content: center;
bottom: 3px;
position: absolute;
width: 100%;
height: 100%;
border-radius: 10px;
opacity: 0;
}
.hover:hover {
opacity: 1;
cursor: pointer;
background-color: var(--Hover);
visibility: visible;
}
Marked as helpful
1