Design comparison
Solution retrospective
i can't make the background for the hover image to work any solutions are welcomed, thanks for reading :)
Community feedback
- @anoshaahmedPosted almost 3 years ago
To avoid accessibility and HTML issues in the future:
- start your headings with h1 and move up by one level each time
- give your <img> tags an alt="" Good job!
0 - @Saran-73Posted almost 3 years ago
Hi π
-
change your
<h2>
to<h1>
to resolve accessibility issue. -
To create that hover effect create a div with same image size using (:before) pseudo element give it backround color then centre the icon inside then make it position absolute to place it above the img and reduse the opacity and z- index property and while hovering change the opacity .Use( cursor:pointer; )property in css for the img div.
-
To understand about not affecting the opacity of the icon while reducing the background opacity ,take a look at the video by (coder coder) in youtube title "how to make background image transparent in Css" will help.
Hope this helps
0 -
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord