0

How can I draw the following background image?

Lines using CSS

1
  • 3
    easiest wa would be the usage of a SVG. alternatively canvas or pseudo-elements can do it aswell Commented Aug 26, 2022 at 9:42

1 Answer 1

4

conic-gradient, mask and pseudo element

html:before,
html:after {
  content: "";
  position: fixed;
  aspect-ratio: 1;
  width: 130%;
  left: -40%;
  bottom: 20%;
  border-radius: 50%;
  border: 20px solid green;
  -webkit-mask: conic-gradient(#000, #0000 65%);
}

html:after {
  transform: translate(15%);
}

Sign up to request clarification or add additional context in comments.

2 Comments

Excellent! Can't we do similar curve only for a section of a page?@temani-afif
@RuhulAmin apply the pseudo element to that section instead of html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.