millsy007 Posted May 5, 2009 Share Posted May 5, 2009 I have a product image that is 4 images 'sewn together' 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 More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 Well it can be done with a combination of CSS and JavaScript. In CSS, just have 4 IDs (each different) and each should scroll to a part of the image. Then use JavaScript to change the ID of the element. Link to comment https://forums.phpfreaks.com/topic/156970-moving-div-background-position-on-click/#findComment-826852 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.