How can I reproduce this design (frontendmentor.io)
Hello, I'm doing a frontendmentor's challenge, and I have difficulties with the circle in the background. I have the full circle as a svg, I've tried to place it as a background-image and position it with background-position but it's not really responsive. Does anyone has an idea ?
12 Replies
Are there any more screens provided? I’d want to see what the designer expected to happen when the screen gets wider or thinner
Frontend Mentor
Frontend Mentor | PayAPI multi-page website coding challenge
This 4-page website will be a great test for your HTML & CSS skills. You'll be building out a marketing site, complete with custom form validation throughout.
That's for mobile,
Tablet
Laptop
So for mobile/tablet it's kind of the same, and it changes for laptop
You'll want something along the lines of
(note I included the
0%
in the calc
to encourage you to tweak the positioning to get it exact, that doesn't do anything currently)Ok thanks I will test that
I'm not sure to understand how I can adapt this to my case. Because I have a svg and I'm not making the circle using radial-gradient. I'm trying to use calc to make the circle's placement responsive
CSS Weekly
YouTube
Creative Section Breaks Using CSS Clip-Path
Learn how to use CSS clip-path and Clip Path editor in Firefox DevTools to create beautiful, fluid section breaks, dividers, and separators.
🔗 Links
Demo: https://codepen.io/ZoranJambor/pen/vYjKoOw/d375ef391d10cc4f4219ae82419d27bc
Clip-Path on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path
Clip-Path Converter: https://yoksel.g...
This may look like you need to use clip-path, but you don't, because the straight sides are actually the result of overflow being hidden. The shape is just an ordinary circle that is larger than the container.
I'm using the radial-gradient in place of the SVG. It's a background element that doesn't need to be an SVG