Design comparison
SolutionDesign
Solution retrospective
I need to know if are a better way to implement the decorative images in the background, thanks!
Community feedback
- Account deleted
A cleaner way is using
::before
and::after
pseudo elements#section-pricing { min-height: 100vh; } #section-pricing::before, #section-pricing::after { content: ''; position: absolute; background-repeat: no-repeat; background-size: 100% 100%; z-index: -1; } #section-pricing::before { background-image: url(../images/bg-bottom.svg); background-position: left; bottom: -30px; left: 0; width: 25%; height: 40%; } #section-pricing::after { background-image: url(../images/bg-top.svg); background-position: 165px -43px; top: -15px; right: 0; width: 67%; height: 40%; }
1@AlexLMCodePosted over 4 years ago@juanmesa2097 Thanks mate! I will implement this on my next projects
1Account deleted@AlexLMCode you're welcome
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