Better css animation

Hey guys, basically I have a tile-able background pattern which is 345pixels in height. I'm trying to animate it moving upwards for a cool effect. Problem is, it gets my laptops fans going! Is there a less intensive way to do this?


At first I used Javascript only, something like this:


var count = 0

setInterval(function() {
  if (count == -345) {
    count = 0
  }

  $('.hero-image').css('background-position', "0 " + count + "px")
  count -= 1
}, 15)

Code (markup):
Then I thought maybe...

Better css animation

from HTML & Website Design http://ift.tt/29gQsKU
via IFTTT
Previous
Next Post »
Thanks for your comment