开发者

Zoom image when i clicked on it

i am working on a project in which i have to make a webpage of photographs. In this page i ha开发者_运维知识库ve to show multiple image. User need is that when he click on any image it will zoom but that time it alsoback webpage as background.


You could change the image width and height by javascript, change its z-index so that it comes top of everything when user clicks the image. When user clicks the image second time, change its width and height to normal.

Have a look at this post.

Hope I answer youe question.


try to put invisible Div on your web page (with z-index: 1; display: none;). After Click just put zoomed image on div and make div visible.


You can use a jQuery plugin like @Abdul said. Considering the fact that is a webpage of photographs, and design is important, you should use NivoZoom or my personal favorite fancybox .

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜