[英]My Image is not loading in my Modal box even though they are in the same folder
I want an image inside my modal box. 我希望在模态框内有一个图像。 I am using CodeIgniter and the image is located in the same folder as my modal box's page. 我正在使用CodeIgniter,并且图像与模式框页面位于同一文件夹中。
This is my modal code 这是我的模态代码
<div class="modal fade" id="modalWin" tabindex="-1" data-backdrop="false">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="winnerDraw">Drawing Winner</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<img src="C:\xampp\htdocs\raffle1\application\views\webRaffle.png" height="200px" width="450px">
<p>{winner name}</p>
</div>
</div>
</div>
</div>
And I already have the necessary boostrap headers as well as script headers. 而且我已经有了必要的boostrap标头和脚本标头。
The img.src is pointing at your C drive. img.src指向您的C驱动器。
You can use a relative url, say src="webRaffle.png"
. 您可以使用相对网址,例如src="webRaffle.png"
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.