DEV Community

loading...
Cover image for CSS Heart Shape

CSS Heart Shape

Toqeer Abbas
Front-end Developer | Self-teaching web development/design, using online resources - Js, ReactJS
・1 min read

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:

Discussion (4)

Collapse
afif profile image
Temani Afif

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

Collapse
toqeer__abbas profile image
Toqeer Abbas Author

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 Author

Gracias por animarme.