How to Make Heart Shape Using CSS | CSS Shapes

Share on facebook
Share on linkedin
Share on twitter
Share on email
Use "ufd6qb86" For Offers

Learn How to Make Heart Shape using CSS Only

https://youtu.be/W2A50j0EVt8

HTML Code

<html>
<head>
  <title>Shape</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="css/style.css"/>

</head>
<body>

	<div class="container">
		<div class="heart-shape"></div>
	</div>


</body>
</html>



CSS Code

body{
	margin:0;
}

*{
	box-sizing: border-box;
}


 .container{
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
}


.heart-shape{
	width: 200px;
	height: 200px;
	background-color: red;
	position: relative;
	transform: rotate(45deg);
}

.heart-shape:before, .heart-shape:after{
	width: 200px;
	height: 200px;
	background-color: red;
	content: '';
	position: absolute;
	border-radius: 50%;
}

.heart-shape::before{
	bottom: 0px;
	left: -100px;

}

.heart-shape::after{
	bottom: 0px;
	top: -100px;

} 
Get 20% Off on Trading Fee Use "LG3RJV7Z"

More To Explore

Use "ufd6qb86" For Offers