如何在Bootstrap模式主体中实现col-lg-10 col-lg-2?

时间:2018-10-15 16:25:31

标签: angular twitter-bootstrap

在以下代码段中,我尝试在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>

0 个答案:

没有答案