开发者

Place an image on a image when a thumbnail is clicked

I have a code like

<a href='javascript:showImage()'><img src='/public/visit_images/img1.jpg' width=100 height=100></img></a>

<div class='orig_image' style="position:absolute; width:200px; height:181px; border:1px solid gray; margin-right: 1em; margin-bottom: 10px;display:none;">
  <div style="width:200px; height:181px; background: url(/public/shift-images/indicator.gif) 50% 50% no-repeat;">
    <img id="caribbean" class="shiftzoom" onLoad="shiftzoom.add(this,{showcoords:true,relativecoords:true});" src="/public/visit_images/img1.jpg" width="200" height="181" alt="large image" border="0" />
  </div>
</div>

First I display the thumbnail image. When a user clicks on the thumbnail, I want the class orig_image, which is the original image, to appear over the thumb nail image. 开发者_运维百科How do I do this?


add z-index in your style:

<div class='orig_image' style="position:absolute; width:200px; height:181px; border:1px solid gray; margin-right: 1em; margin-bottom: 10px;display:none;z-index:999;">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜