css only heart shape
HTML
website: here
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<div class="div">
<div class="heart"></div>
</div>
</body>
</html>
CSS
*{
box-sizing: border-box;
padding: 0;
margin: 0;
}
body{
display: flex;
justify-content: center;
}
.div{
margin-top: 20vh;
width: 300px;
height: 300px;
display: flex;
justify-content: center;
align-items: center;
}
.heart{
width: 100px;
height: 150px;
position: relative;
}
.heart::before{
content: '';
width: 100px;
height: 160px;
background-color: deeppink;
position: absolute;
transform: rotate(45deg);
left: 22px;
border-radius: 50% 50% 0 0;
}
.heart::after{
content: '';
width: 100px;
height: 160px;
background-color: deeppink;
position: absolute;
transform: rotate(-45deg);
right: 22px;
border-radius: 50% 50% 0 0;
}