bootstrap把小图片放大
未知
2021-05-11 15:12:53
0次
<td class="openimg"><img style="width: 100px; cursor: default;" class="showpic" src="46d93f2b3d42a31.png" alt="" ></td>
<style type="text/css">
#ShowImage_Form .modal-body .carousel-inner{
width: auto;
}
</style>
<div id="ShowImage_Form" class="modal hide">
<div class="modal-header" style="background-color: red;">
<button data-dismiss="modal" class="close" type="button" >
<span aria-hidden="true" style="font-size: 30px">×</span>
</button>
</div>
<div class="modal-body">
<div id="img_show" style="justify-content: center;display: flex;">
</div>
</div>
</div>
<script type="text/javascript">
$(".showpic").click(function(){
source=$(this).attr('src');
$("#ShowImage_Form").find("#img_show").html("<image src='"+source+"' class='carousel-inner img-responsive img-rounded' />");
$("#ShowImage_Form").modal();
$("#ShowImage_Form").removeClass('hide');
})
$(".openimg img").attr('onmouseover',"this.style.cursor='pointer';this.style.cursor='hand'")
$(".openimg img").attr('onmouseout',"this.style.cursor='default'")
</script>
相关内容