Created
August 29, 2021 21:30
-
-
Save zazaulola/796732c87d20d1e64a5b76b672f79114 to your computer and use it in GitHub Desktop.
Parcel jump animation
This file contains hidden or 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
<div id="parcel">📦</div> | |
<style> | |
#parcel { | |
position: absolute; | |
font-size: 4rem; | |
animation: jump 1.2s infinite; | |
} | |
@keyframes jump { | |
0% { transform: translate(-50%, -50%) scale(1.25, 0.75); } | |
50% { transform: translate(-50%, -150%) scale(1, 1); } | |
55% { transform: translate(-50%, -150%) rotate(15deg); } | |
60% { transform: translate(-50%, -150%) rotate(-15deg); } | |
65% { transform: translate(-50%, -150%) rotate(15deg); } | |
70% { transform: translate(-50%, -150%) rotate(-15deg); } | |
100% { transform: translate(-50%, -50%) scale(1.25, 0.75); } | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment