console
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css画桃心</title>
<style media="screen">
.heart-body {
width: 500px;
margin: 100px auto;
position: relative;
}
.heart-shape {
position: relative;
width: 100px;
height: 100px;
background-color: transparent;
border-bottom: 2px solid red;
border-right: 2px solid red;
transform: rotate(45deg);
}
.heart-shape:before,
.heart-shape:after {
position: absolute;
content: '';
width: 100px;
height: 100px;
background-color: transparent;
}
.heart-shape:before {
left: -45px;
border: 1px solid red;
position: absolute;
border-radius: 50% 0 0 50%;
transform: translateZ(-6px);
}
.heart-shape:after {
top: -45px;
border-top: 1px solid black;
border: 1px solid black;
position: absolute;
border-radius: 50% 50% 0 0;
transform: translateZ(-6px);
}
</style>
</head>
<body>
<div class="heart-body">
<div class="heart-shape"></div>
</div>
</body>
</html>