JSFiddle - React, Tailwind, and code Playground

by jshacker

HTML

<div id="heart">
  <div id="inner-heart"></div>
</div>

CSS

div {
  height: 120px;
  width: 80px;
  background-color: red;
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translate(-50%, -50%);
}

#heart {
  transform: rotate(45deg);
  border-radius: 50% 50% 2% 2%;
}

#heart::after {
  background-color: red;
  content: " ";
  height: 80px;
  width: 120px;
  position: absolute;
  bottom: -2%;
  left: -52%;
  border-radius: 50% 2% 2% 50%;
}

#inner-heart {
  height: 90px;
  width: 60px;
  background-color: pink;
  z-index: 10;
  position: relative;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50% 50% 0 0;
}

#inner-heart::after {
  height: 60px;
  width: 90px;
  content: " ";
  position: absolute;
  bottom: -5%;
  left: -52%;
  background-color: pink;
  border-radius: 50% 2% 2% 50%;
}