在以下代码段中,我尝试在Bootstrap模态主体col-lg-10和col-lg-2内实现两个并排网格,但不是水平出现col-lg-2显示在col-lg-10下方。
<div class="modal fade" id="displayImageModal" tabindex="-1" role="dialog">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
</div>
<div class="modal-body">
<div class="col-lg-12">
<div class="col-lg-10 text-center" id="modalDisplayImage">
<img class="img-fluid" src="assets/img/{{modalImage}}">
</div>
<div class="col-lg-2" id="productCards">
<div class="row" *ngFor="let image of displayImages">
<div class="col-lg-12">
<div class="card">
<a (click)="setModalImage(image)">
<img class="img-fluid card-img-top w-100 d-block"
src="assets/img/{{image}}">
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>