1

I have a page with series of oversize images that go over the left, right and even bottom of the screen. One of these images might look like so:

enter image description here

I would like:

(a) The image to appear centered a top on first load (as in illustration)

(b) For the user to be able to scroll left, right, up down to all corners of the image, after the page has loaded

I emphasize that I am NOT looking for a fixed height solution; the image's height WILL go beyond the height of screen.

I have looked around but I can't figure out how to do this.

Or Assayag
  • 5,662
  • 13
  • 57
  • 93
Labrador
  • 623
  • 7
  • 13
  • Possible duplication of https://stackoverflow.com/questions/41090647/css-background-image-that-can-scroll – S_R Jun 24 '18 at 22:33
  • I ended up solving this with `window.scrollTo` in javascript. Beware you might need to wrap the command inside of a `setTimeout` block, as detailed here https://stackoverflow.com/questions/51023144/why-does-window-scrollto-require-settimeout-in-order-to-work – Labrador Apr 25 '21 at 09:08

0 Answers0