<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>
<p id="ShowImage_Form" class="modal hide">
<p class="modal-header">
<button data-dismiss="modal" class="close" type="button"></button>
</p>
<p class="modal-body">
<p id="img_show">
</p>
</p>
</p>实现JS:
//显示大图
function showimage(source)
{
$("#ShowImage_Form").find("#img_show").html("<image src='"+source+"' class='carousel-inner img-responsive img-rounded' />");
$("#ShowImage_Form").modal();
}
实现效果:

【相关视频推荐:Bootstrap教程】
以上就是如何用Bootstrap实现图片弹出放大的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号