Jump to content

Moving div Background Position on Click


millsy007

Recommended Posts

 

I have a product image that is 4 images 'sewn together'

trainers

 

I am going to set a div called ProductImage and then have the background of the div set to this image, but with only the top image showing.

 

I then want to have a button for 'more views' and when this is clicked the background position shift to show the next part of the image showing a different view.

 

What is a suitable way to do this, I am hoping it could be done with a combination of css and javascript.

Link to comment
https://forums.phpfreaks.com/topic/156970-moving-div-background-position-on-click/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.