How to do this image zooming trick in a browser?

倖福魔咒の 提交于 2019-12-13 03:49:11

问题


I would like to do the following trick in a browser:

Create three image files of different size (small, medium, large) from one picture.

  • First, display the small image in a browser.

  • When a user zooms in the small image replace it with the medium one.
    Now the user can scroll it within the window up and down, left and right.

  • When a user zooms out the small image replace it with the small one, etc.

I would prefer JavaScript (Flash is the second option). What tool would you recommend ?


回答1:


A quick google search turns up:

http://www.intenseblog.com/design/8-amazing-javascript-image-zoom-scripts.html

and:

http://www.hotscripts.com/blog/javascript-zoom-scripts/

Several of these libraries appear to do what you want.




回答2:


Would this work for you?

http://www.netzgesta.de/shiftzoom/

This might be for image data that is much larger than you are interested in.



来源:https://stackoverflow.com/questions/5084003/how-to-do-this-image-zooming-trick-in-a-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!