Curve bottom side of the div to the inside with CSS

后端 未结 2 1810
耶瑟儿~
耶瑟儿~ 2020-11-22 13:37

I would like to curve the bottom side of this rectangle div/background with CSS, so the result is something like this:

Does someone have an idea perhaps how it cou

2条回答
  •  执笔经年
    2020-11-22 14:10

    Check this. I created this with :after pseudo element. It can be helpful if the background is solid color.

    .curved {
      margin: 0 auto;
      width: 300px;
      height: 300px;
      background: lightblue;
      position: relative;
    }
    .curved:after{
      background: white;
      position: absolute;
      content: "";
      left:0;
      right:0;
      bottom: -25px;
      height: 50px;
      border-radius: 50% 50% 0 0;
    }

提交回复
热议问题