Design comparison
SolutionDesign
Solution retrospective
I set hero image from css styles as background-image
and use background-position:center center;
and background-size:cover
into a <div class="image"> </div>
.
Is it possible use <img src="" alt="">
and get similar behaviour with css?
Community feedback
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