我正在开发laravel 5.0。我正在使用bootstrap功能,即; modal。我只是想在模态内容中添加一个图像。我正在获取图像,但无法调整该图像的大小。另外,通过使用css,对图像大小没有影响。
我的代码:
@foreach($gallery->images as $image)
<section id="gal" class="col-md-3">
<a class="col-md-3" href="" data-toggle="modal"
data-target="#yourModal{{ $image->id }}">
<img src="{{ url($image->file_path) }}"></a>
</section>
@endforeach
@foreach($gallery->images as $image)
<div class="modal fade" id="yourModal{{ $image->id }}"
tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">×</button>
</div>
<div id="modalimage1" class="modal-body">
<img id="modalimage" src="{{ url($image->file_path) }}">
</div>
<div class="modal-footer">
<div class="row">
<section class="col-md-offset-1 col-md-2">
<img id="jumboimage" src="/src/images/g.jpg"/>
</section>
</div>
</div>
</div>
</div>
</div>
我的CSS:
#modalimage{
width:20px;
height:20px;
}
#jumboimage{
width:10px;
height:15px;
}