DEV Community

Cover image for CSS Heart Shape
Toqeer Abbas
Toqeer Abbas

Posted on

CSS Heart Shape

in this post, I will tell you how we can make a heart shape in CSS.
HTML
Alt Text

CSS
After adding HTML you need to style it with CSS.
1- Style body tag

Alt Text
2- style heart class
Alt Text

3- Style Pusedo-class ::after ,::before
Alt Text

After it runs into the browser.

I hope you learn from this. if you want a video of this
video link:

Top comments (4)

Collapse
 
afif profile image
Temani Afif

my one element version: stackoverflow.com/a/51216413/8620333

Collapse
 
toqeer__abbas profile image
Toqeer Abbas

Great

Collapse
 
jlrxt profile image
Jose Luis Ramos T.

Muy útil por ahora estoy en HTML pero probaré tu código. Gracias por compartir.

Collapse
 
toqeer__abbas profile image
Toqeer Abbas

Gracias por animarme.