Half circle with CSS (border, outline only)

前端 未结 4 713
抹茶落季
抹茶落季 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:06

    Below is a minimal code to achieve the effect.

    This also works responsively since the border-radius is in percentage.

    .semi-circle{
    width: 200px;
    height: 100px;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    border: 10px solid #000;
    border-bottom: 0;
    }

提交回复
热议问题