Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize the Heart-shaped effect of likes by CSS

Shulou Source: shulou.com Published: 2022-06-01 11:37:32 10月02日 Update

Editor to share with you how to achieve the heart-shaped effect of CSS like effect, I hope you will learn something after reading this article, let's discuss it together!

CSS realizes the heart-shaped effect of giving likes.

Like

Img {

/ * width: 20px

Height: 20pxdomestic /

Position: absolute

Bottom: 100px

Left: 50%

Margin-left:-12.5px

}

.btn {width: 100px; height: 30px; border:0; background: red; color: # fff; position: absolute; bottom: 100px; left: 50%; margin-left:-50px;}

$(function () {)

$("# btn1") On ('click', function () {

$(".demo") Append ("

")

$("img") Animate ({

Bottom: "200px"

Width: "50px"

MarginLeft: "- 25px"

Opacity: "0"

}, 1000, function () {

$(".demo") Empty ()

})

})

})

After reading this article, I believe you have a certain understanding of "how to achieve the heart-shaped effect of CSS". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!

Tags: Effects Heart shape articles done more knowledge Industry Information Information Channel Channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker Shulou Information Linux Shulou Tech Info Xiaomi