Thus, the best solution for your problem would be to use an SVG form like this or a custom font, since you can change the color and they will scale well for the retina, etc.
CSS3 is generally great for creating basic shapes, however, when it comes to the outlines it drops, it crashes. This is because they usually rely on creating multiple shapes using pre and post selectors. This usually works, but if you want to apply a border, it will cause matching problems with the form.
The only real css solution would be to create a second heart shape, a little smaller like a mask. But this is a markup divorce, so SVG is your best bet.
A quick and dirty example above and an overlapping heart is here https://jsfiddle.net/6qywoxsk/
.heart { position: absolute; width: 100px; height: 90px; } .heartCon{ position:relative; } .heart:before, .heart:after { position: absolute; content: ""; left: 50px; top: 0; width: 50px; height: 80px; background: red; -moz-border-radius: 50px 50px 0 0; border-radius: 50px 50px 0 0; -webkit-transform: rotate(-45deg); -moz-transform: rotate(-45deg); -ms-transform: rotate(-45deg); -o-transform: rotate(-45deg); transform: rotate(-45deg); -webkit-transform-origin: 0 100%; -moz-transform-origin: 0 100%; -ms-transform-origin: 0 100%; -o-transform-origin: 0 100%; transform-origin: 0 100%; } .heart:after { left: 0; -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg); -webkit-transform-origin: 100% 100%; -moz-transform-origin: 100% 100%; -ms-transform-origin: 100% 100%; -o-transform-origin: 100% 100%; transform-origin :100% 100%; } .heart2{ -ms-transform: scale(0.9); -webkit-transform: scale(0.9); transform: scale(0.9); } .heart2:before, .heart2:after { background:#fff; top: 0px; }
<div class="heartCon"> <div class="heart"></div> <div class="heart heart2"></div> </div>
Dominic green
source share