Semi-oval with CSS

后端 未结 3 412
清酒与你
清酒与你 2020-12-18 21:50

I\'m trying to create a mix between an oval and a semi-circle.

Semi-circles can be created as such in CSS:

.halfCircle{
     height:45px;
     width         


        
3条回答
  •  难免孤独
    2020-12-18 22:27

    We can use css3 radial-gradient() as well to draw this shape:

    .halfOval {
      background: radial-gradient(ellipse at 50% 100%, #a0C580 70%, transparent 70%);
    }
    

    .halfOval {
      background: radial-gradient(ellipse at 50% 100%, #a0C580 70%, transparent 70%);
      margin: 50px auto;
      height: 100px;
      width: 400px;
    }

提交回复
热议问题