Skip to content

Instantly share code, notes, and snippets.

@Rikezenho
Last active November 25, 2020 16:18
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Rikezenho/3539b045c73d2f52006a1e9ebcbcac7e to your computer and use it in GitHub Desktop.
Save Rikezenho/3539b045c73d2f52006a1e9ebcbcac7e to your computer and use it in GitHub Desktop.
A snippet to make an italian gesture hand appear in page
(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