Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to Create a Multiple Semi-circle on The Right Side with CSS

How to create multiple half/semi-circle on one side only (check my image below)?

My expected result:

Expected

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

The result:

enter image description here

This code I have try. css:

.ticket {
  display: inline-block;
  width: 500px;
  height: 200px;
  overflow: hidden;
  background: orange;
  -webkit-mask: var(--mask);
  mask: var(--mask);
  --mask: radial-gradient(16px at 16px 50%, #0000 100%, #000) -16px/ 100% 50px;
}

html:

<div class="ticket"></div>

>Solution :

Pick the right side version from my online generator then update the radius

enter image description here

.ticket {
  display: inline-block;
  width: 500px;
  height: 200px;
  overflow: hidden;
  background: orange;
  /* 20px is the radius, it needs to be smaller than 50px/2 */
  --mask: radial-gradient(20px at right,#0000 97%,#000) 50%/100% 50px;
  -webkit-mask: var(--mask);
          mask: var(--mask);
}
<div class="ticket"></div>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading