Last active
November 25, 2020 16:18
-
-
Save Rikezenho/3539b045c73d2f52006a1e9ebcbcac7e to your computer and use it in GitHub Desktop.
A snippet to make an italian gesture hand appear in page
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
(function () { | |
var url = 'https://i.kym-cdn.com/photos/images/newsfeed/001/331/288/371.png'; | |
var image = new Image(); | |
image.src = url; | |
image.width = 300; | |
image.style = 'position: fixed; bottom: 20px; transform: translateX(-1000px); transition: all 0.5s ease; animation: anim 2s 2s;'; | |
var style = document.createElement('style'); | |
style.innerHTML = '@keyframes anim { 15% { transform: translateX(-40px); } 25% { transform: translateX(-40px) rotate(45deg); } 50% { transform: translateX(-40px) rotate(0deg); } 75% { transform: translateX(-40px) rotate(45deg); } 90% { transform: translateX(-40px) rotate(0deg); } 99% { transform: translateX(-1000px) rotate(45deg); } }'; | |
document.body.appendChild(style); | |
document.body.appendChild(image); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment