Created
April 2, 2019 06:37
-
-
Save hopearmstrong/30edccde8303ddcbf5225285f75015b8 to your computer and use it in GitHub Desktop.
Beating Heart Animation on Hover
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#smiley-love | |
#smiley | |
&-blush | |
display: none | |
a | |
display: inline-block | |
&:hover | |
#smiley | |
transform: scale(1.1) | |
transform-origin: center | |
-webkit-animation: heartbeat 1.5s ease-in-out infinite both | |
animation: heartbeat 1.5s ease-in-out infinite both | |
&-blush | |
display: inherit | |
&-eye-left | |
transform-origin: center | |
transform: scale(.7) translate(-8px) | |
&-eye-right | |
transform-origin: center | |
transform: scale(.7) translate(8px) | |
&-mouth | |
transform: translateY(-22px) scale(1.6) | |
transform-origin: center | |
/* ---------------------------------------------- | |
* animation heartbeat | |
* Generated by Animista on 2019-3-24 18:51:13 | |
* w: http://animista.net, t: @cssanimista | |
* ---------------------------------------------- */ | |
@-webkit-keyframes heartbeat | |
from | |
-webkit-transform: scale(1) | |
transform: scale(1) | |
-webkit-transform-origin: center center | |
transform-origin: center center | |
-webkit-animation-timing-function: ease-out | |
animation-timing-function: ease-out | |
10% | |
-webkit-transform: scale(0.91) | |
transform: scale(0.91) | |
-webkit-animation-timing-function: ease-in | |
animation-timing-function: ease-in | |
17% | |
-webkit-transform: scale(0.98) | |
transform: scale(0.98) | |
-webkit-animation-timing-function: ease-out | |
animation-timing-function: ease-out | |
33% | |
-webkit-transform: scale(0.87) | |
transform: scale(0.87) | |
-webkit-animation-timing-function: ease-in | |
animation-timing-function: ease-in | |
45% | |
-webkit-transform: scale(1) | |
transform: scale(1) | |
-webkit-animation-timing-function: ease-out | |
animation-timing-function: ease-out | |
@keyframes heartbeat | |
from | |
-webkit-transform: scale(1) | |
transform: scale(1) | |
-webkit-transform-origin: center center | |
transform-origin: center center | |
-webkit-animation-timing-function: ease-out | |
animation-timing-function: ease-out | |
10% | |
-webkit-transform: scale(0.91) | |
transform: scale(0.91) | |
-webkit-animation-timing-function: ease-in | |
animation-timing-function: ease-in | |
17% | |
-webkit-transform: scale(0.98) | |
transform: scale(0.98) | |
-webkit-animation-timing-function: ease-out | |
animation-timing-function: ease-out | |
33% | |
-webkit-transform: scale(0.87) | |
transform: scale(0.87) | |
-webkit-animation-timing-function: ease-in | |
animation-timing-function: ease-in | |
45% | |
-webkit-transform: scale(1) | |
transform: scale(1) | |
-webkit-animation-timing-function: ease-out | |
animation-timing-function: ease-out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment