Chukwuka Eze• 310
@ezechuka
Posted
Nice work James on finishing this project. Having observed your code you can make the icon display by this few changes:
-
In your
index.html
you should change it from a div to an img:<img class="card__image--icon" src="./images/icon-view.svg" alt="preview">
-
Go to your style.css and set the display to
none
by default andblock
on hover.
.card__image--container .card__image--icon {
display: none;
}
.card__image--container:hover .card__image--icon {
display: block;
position: absolute !important;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
1