-4

Is it possible to create this shape in CSS without using an svg? Basically a rectangle with an inverted curve on the bottom.

Any help appreciated!

enter image description here

Josh
  • 110
  • 1
  • 7

1 Answers1

0

You can use mask-image along with radial-gradient to cut off the bottom part

body {
  /* demonstration purpose */
  background-image: repeating-linear-gradient(45deg, #606dbc, #606dbc 12px, #465298 12px, #465298 24px);
}

div {
  width: 200px;
  height: 120px;
  background-color: white;
  -webkit-mask-image: radial-gradient(closest-corner at 50% 175%, transparent 0%, transparent 99.5%, #fff 100%);
  mask-image: radial-gradient(closest-corner at 50% 175%, transparent 0%, transparent 99.5%, #fff 100%);
}
<div></div>
Hao Wu
  • 17,573
  • 6
  • 28
  • 60