9

I've come across a number of parallaxing tutorials (this one in particular I'm looking at now: http://net.tutsplus.com/tutorials/html-css-techniques/simple-parallax-scrolling-technique/); however, they all seem to involve a background image in a <div> that's fixed. Is is possible to achieve a similar parallax effect if my image is in a <img> tag?

Matt
  • 2,317
  • 7
  • 41
  • 52
  • Sure, they're both elements, they both can be positioned with CSS, and they both can be repositioned with JavaScript. –  Jun 30 '13 at 17:54
  • The reason for background image is that it's CSS-only solution. Other solutions require using Javascript. – jave.web Sep 17 '18 at 00:05

1 Answers1

3

Provided you use the same attributes then yeah sure it can

An example of this can be seen here: http://webdesign.tutsplus.com/tutorials/complete-websites/create-a-parallax-scrolling-website-using-stellar-js/

Web Develop Wolf
  • 5,996
  • 12
  • 52
  • 101