开发者

How would i go about having a large background eg 3000px x 2914px and be able to drag it around using jquery

I have a large background image on a div that is 100% x 100%. what i would like is when the user comes to the site they are able to drag around the background im开发者_C百科age so they can view it all but have constraints on how far they can drag it horizontally and vertically so if they reach those constraints it wont let them drag any further.

here is a perfect example on what i would like to acheive - http://irrland.sonntagskunst.de/

If you could point me in the right direction that would be much appreciated.

thanks in advance


partial solution but on the right track I think:

http://jsfiddle.net/cSKq2/2/

kudos to https://stackoverflow.com/users/772035/paulpro who I ripped it from 'onmousedrag' event js

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜