代码之家  ›  专栏  ›  技术社区  ›  Hacker

单击缩略图时将图像放置在图像上

css
  •  0
  • Hacker  · 技术社区  · 14 年前

    <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>
    

    首先我显示缩略图。当用户单击缩略图时,我想要类 orig_image

    1 回复  |  直到 14 年前
        1
  •  1
  •   khairil    14 年前

    在样式中添加z索引:

    <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;">