Design comparison
Solution retrospective
I know this is a mess but with your help, I can be able to code it well next time 😘
Could someone please explain to me how to use .svg images as background-images and the easy way to center the profile image, thanks
Community feedback
- @correlucasPosted over 2 years ago
Hello Garang,
You can import the svg image as a background using the inside the body or inside a class using the property
background-image: url(insert here the folder location)
.Marked as helpful1@garang-dengPosted over 2 years ago@correlucas thanks for the feedback. This is very helpful Lucas but how can I make it (them, top and bottom images) appear as the original? You can see I've left it out in my project 🙈🙈🙈
1@correlucasPosted over 2 years ago@Garang-Deng The only way to have the exact match is having the Figma/Sketch files given from the premium subscription. But you can try to adjust using the reference jpeg image from the starter files to reach a result as close as possible.
Here's one example:
body { background-image: url(./images/bg-pattern-top.svg), url(./images/bg-pattern-bottom.svg); background-position: top -500px left -350px, bottom -500px right -350px;** background-size: cover; background-repeat: no-repeat;}
Note that inside the
background-image
property you can insert the circle image that goes to the top and bottom and all the following properties will change them. Usebackground-position
to adjust the position of each circles considering the image sequence.See if works for you bro and feel free to ask me further questions.
Marked as helpful1
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