开发者

swap an image to a small area of a larger image

开发者 https://www.devze.com 2023-02-19 01:24 出处:网络
I have an image showing 42 classmates from 1958. I want to map each small face and replace it with a current portrait on a mouse rollover. The swapimage code works ok, but the new portrait is the size

I have an image showing 42 classmates from 1958. I want to map each small face and replace it with a current portrait on a mouse rollover. The swapimage code works ok, but the new portrait is the size of the original complete image.

<area shape="rect" coords="72,260,143,346" href="#" onMouseOver="MM_swapImage('Image1','','../LoisS.jpg',1)" alt="" onMouseOut="MM_swapImgRestore()">

How can I get the small image to stay sma开发者_C百科ll and overlay only the original face, leaving the original large image in place behind it? Can I somehow amend the code above? [I'm no good at writing my own js or css].

many thanks


You could have a look at jQuery. This makes showing a bigger version of an image rather easy.

Please have a look at: http://jsfiddle.net/DVDhs/. I tried to make something similar which might be what you're after.

0

精彩评论

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