@sqle157
Posted
Hi,
Congratulations on completing your challenge! For your question, you can try to use pseudo element ::after
or ::before
instead of having another img
tag in your code.
For example, this is how I'm gonna handle the image hover
.art-div::after {
content: ''; // you can also put the image as the content in here
display: none;
position: absolute;
inset: 0;
border-radius: 0.75rem;
background: url(./images/icon-view.svg), hsl(178, 100%, 50%, 0.5);
background-repeat: no-repeat;
background-position: center;
}
.art-div:hover::after {
display: block;
}
I hope this answers your question!
Happy coding and good luck with further challenges!
Marked as helpful
@its-haanna
Posted
@sqle157 Thanks for the tip, I'll look into it!