Created
October 22, 2014 19:17
-
-
Save Ariel-Rodriguez/0ef4126ae1c0151f73b6 to your computer and use it in GitHub Desktop.
A Pen by Ariel.
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
<div class="hotdogstore"> | |
</div> |
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 img= '<img src="https://cdn2.iconfinder.com/data/icons/vector-icons-pack-part-6/57/fast_food_hot_dog_sausage-512.png" class="hotdog"></img>'; | |
$(".hotdogstore").append(img); | |
var dogcreator = setInterval(function(){ | |
$(".hotdogstore").append(img); | |
}, 2001); | |
setTimeout(function(){ clearInterval(dogcreator) }, 10000); | |
}); | |
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
.hotdog { | |
position: absolute; | |
width:100px; | |
height:100px; | |
-webkit-animation: random-movement 5s ease-out 0 infinite; /* Safari 4+ */ | |
} | |
@-webkit-keyframes random-movement { | |
100% { | |
-webkit-transform: translate(1000px) rotate(360deg); | |
-webkit-transform-origin: 60% 100%; | |
opacity: 0; | |
}, | |
50% { | |
-webkit-transform-origin: 60% 100%; | |
-webkit-transform: translate(10000px) rotate(360deg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment