Design comparison
Solution retrospective
Would appreciate if someone tells me or shows me another way of creating the background for the body, that contains the two kinda circular svgs'
Community feedback
- @correlucasPosted about 2 years ago
๐พHello Odo Peter, Congratulations on completing this challenge!
โ Answering your question:
Instead of adding these images with
after/before
, you can do it usingbackground-image
, in my opinion is the best way is by usingbackground-image
to manage it since adding them to thebody
you make sure it will be under everything, to manage multiple images inside a single css property asbackground-image
you will use the comma inside each properties declare the single modification for each circle separated. See the code below to see your solution with those backgrounds applied:body { background-color: hsl(185deg, 75%, 39%); background-image: url(./img/bg-pattern-top.svg), url(./img/bg-pattern-bottom.svg); background-repeat: no-repeat, no-repeat; background-position: top -400px left -53px, bottom -597px right 75px; position: relative; background-color: var(--official-bg); font-family: 'Kumbh Sans', sans-serif; min-height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center; overflow: hidden; } .container { display: flex; align-items: center; justify-content: center; overflow: hidden; /* background-color: var(--official-bg); */ width: 100%; height: 100%; }
โ๏ธ I hope this helps you and happy coding!
1
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