Design comparison
SolutionDesign
Community feedback
- @IgorGGuimaraesPosted 10 months ago
To solve the background problem, instead of setting the image as a background to the <body> in the CSS, you can import the image to the HTML and change its properties in the CSS. I did this:
<body> ... <img class="pattern-mobile" src="./images/bg-mobile.png" alt="pattern mobile"> <img class="pattern-desktop" src="./images/bg-desktop.png" alt="pattern desktop"> ...CSS: .pattern-mobile{ position:absolute; z-index:-1; top:0; left:0; min-height: 100%; width: 100%; }
.pattern-desktop{ display:unset; z-index:-1; position: absolute; right:0; bottom:0; width:100vw; height:50vh;
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