heart animation css Archives - csshint - A designer hub https://csshint.com/tag/heart-animation-css/ Sun, 20 Sep 2020 05:22:10 +0000 en-US hourly 1 https://wordpress.org/?v=6.3.4 Pure CSS Twitter Heart Animation https://csshint.com/pure-css-twitter-heart-animation/ Sun, 20 Sep 2020 05:22:10 +0000 http://csshint.com/?p=3821 Check out this Cool Pure CSS Twitter Heart Animation Designed by Donovan Hutchinson. HTML [code language=”html”] <div class="heart"></div> [/code] CSS [code language=”css”] .heart { width: 100px; height: 100px; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: url(https://cssanimation.rocks/images/posts/steps/heart.png) no-repeat; background-position: 0 0; cursor: pointer; animation: fave-heart 1s steps(28); } .heart:hover { background-position: -2800px 0; […]

The post Pure CSS Twitter Heart Animation appeared first on csshint - A designer hub.

]]>
Check out this Cool Pure CSS Twitter Heart Animation Designed by Donovan Hutchinson.

CSS Heart Animation

CSS Heart Animation


HTML

[code language=”html”]

<div class="heart"></div>

[/code]

CSS

[code language=”css”]

.heart {
width: 100px;
height: 100px;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
background: url(https://cssanimation.rocks/images/posts/steps/heart.png) no-repeat;
background-position: 0 0;
cursor: pointer;
animation: fave-heart 1s steps(28);
}
.heart:hover {
background-position: -2800px 0;
transition: background 1s steps(28);
}
@keyframes fave-heart {
0% {
background-position: 0 0;
}
100% {
background-position: -2800px 0;
}
}

[/code]

Twitter Heart

The post Pure CSS Twitter Heart Animation appeared first on csshint - A designer hub.

]]>