开发者

ZOOMING AN IMAGE [duplicate]

开发者 https://www.devze.com 2023-01-25 18:26 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: how to zoom in开发者_如何学Python the image and center it
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

how to zoom in开发者_如何学Python the image and center it

how can javascript be useful in zooming an image . I want to zoom it when we double click on it.


Attach an onclick/ondoubleclick handler to the image. When it fires, increase the image's height/width by a certain percentage.

The very basic version:

<img src="somepic.jpg" height="XXX" width="YYY" ondblclick="this.height *= 1.1; this.width *= 1.1" />
0

精彩评论

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