开发者

ZOOMING AN IMAGE [duplicate]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜