Joined August 2012
·

Guido Bouman

Interaction Engineer at Q42
·
Amsterdam
·
·
·

Posted to Parallax scroll with CSS over 1 year ago

There's also the option to make the perspective container scrolling, and drop the JS. Tadaa: instant parallax. Because the content moves in a scrolling div, you don't need to adjust the perspective origin. Neat trick, right?

Unfortunately, you'll lose elastic scrolling on mobile, and that is quite a deal breaker.

For now, onscroll + touchmove appears to be the best solution.

EDIT:

See http://keithclark.co.uk/articles/pure-css-parallax-websites/ for the pure CSS solution.

@tralamazza Just realised. Nice way of sanitising the data.

Wouldn't the following do the trick too?

var arrayoffoos = obj.foos || [];

EDIT:
Ah, stupid, the concat takes care of the single value issue of course.

Posted to coderwall logo made with HTML & CSS over 1 year ago

I'd include ITC Avant Garde Gothic for the people that do have the font on their computers.

Achievements
275 Karma
16,376 Total ProTip Views