Bootstrap实现图片弹出放大

前台HTML:

复制代码
<td><center><img style="height: 100px;width: 100px;" onmouseover="this.style.cursor='pointer';this.style.cursor='hand'" onmouseout="this.style.cursor='default'"  src="<?php echo $v['pic_detail'];?>" onclick="javascript:showimage('<?php echo $v['pic_detail'];?>');" /></center></td>
  

<div id="ShowImage_Form" class="modal hide">         
         <div class="modal-header">
             <button data-dismiss="modal" class="close" type="button"></button>
         </div>
           <div class="modal-body">
            <div id="img_show">
            </div>
        </div>
    </div>
复制代码

实现JS:

//显示大图    
   function showimage(source)
     {
         $("#ShowImage_Form").find("#img_show").html("<image src='"+source+"' class='carousel-inner img-responsive img-rounded' />");
         $("#ShowImage_Form").modal();
     }

实现效果:

image

展开阅读全文
博主设置当前文章不允许评论。

没有更多推荐了,返回首页