Skip to content

Instantly share code, notes, and snippets.

@Ariel-Rodriguez
Created October 22, 2014 19:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ariel-Rodriguez/0ef4126ae1c0151f73b6 to your computer and use it in GitHub Desktop.
Save Ariel-Rodriguez/0ef4126ae1c0151f73b6 to your computer and use it in GitHub Desktop.
A Pen by Ariel.
<div class="hotdogstore">
</div>
$(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);
});
.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