title: How to create a heart shape using CSS?
body: <p>I've found the following CSS in one of the answers here on SO and I was wondering why does it create the desired heart shape:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#heart { 
      position: relative; 
      width: 100px; 
      height: 90px; 
  } 
  
  #heart:before, #heart:after { 
      position: absolute; 
      content: ""; 
      left: 50px; 
      top: 0; 
      width: 50px; 
      height: 80px; 
      background: red; 
      border-radius: 50px 50px 0 0; 
      transform: rotate(-45deg); 
      transform-origin: 0 100%; 
  } 
  
  #heart:after { 
      left: 0; 
      transform: rotate(45deg); 
      transform-origin :100% 100%; 
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="heart"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please can someone explain?</p>