Half circle with CSS (border, outline only)

前端 未结 4 709
抹茶落季
抹茶落季 2020-12-01 03:28

I\'m trying to create a circle with CSS, which looks exactly like on the following picture:

\"enter

4条回答
  •  暖寄归人
    2020-12-01 04:04

    I had a similar issue not long time ago and this was how I solved it

    .rotated-half-circle {
      /* Create the circle */
      width: 40px;
      height: 40px;
      border: 10px solid black;
      border-radius: 50%;
      /* Halve the circle */
      border-bottom-color: transparent;
      border-left-color: transparent;
      /* Rotate the circle */
      transform: rotate(-45deg);
    }

提交回复
热议问题