繁体   English   中英

水平卡片并排 html 引导程序

[英]horizontal cards side by side html bootstrap

如何实现 2 张水平(行)卡并排? 这是我到目前为止的代码,当我复制 n 粘贴它时,卡片碰撞 n 变得一团糟。

我需要像这样并排放置卡片

在此处输入图片说明

<div class="card-body p-0 d-flex justify-content-around flex-wrap">
        <div class="col-md-3 ">
            <div class="card card-style1">

                <div class="card-header s-2">
                    <h3 class="card-title">Data </h3>
                </div>

     <div class="card-body d-flex justify-content-center" style="overflow-y: auto; list-style-type:none;">
                    <table class="data-info-table">
                        <tr data-toggle="tooltip" data-placement="left" title="Data Name">
                            <td><i class="fas fa-user "></i></td>
                            <td><textarea class="form-control asd" id="client" rows="1"  type="text" style="resize: none; overflow-y: auto;"></textarea>
                            </td>
                        </tr>

                        </tr>
    </div>
</div>
    </div>  

    </div>

直接从Bootstrap Card复制。 我刚刚为两张卡添加了一个带有 class="row" 和 col-6 的新父 div。

 <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" /> <div class="row col-12"> <div class="card col-6"> <img class="card-img-top" src="https://images.pexels.com/photos/20787/pexels-photo.jpg?cs=srgb&dl=adorable-animal-cat-20787.jpg&fm=jpg" alt="Card image cap"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> <a href="#" class="btn btn-primary">Go somewhere</a> </div> </div> <div class="card col-6"> <img class="card-img-top" src="https://images.pexels.com/photos/20787/pexels-photo.jpg?cs=srgb&dl=adorable-animal-cat-20787.jpg&fm=jpg" alt="Card image cap"> <div class="card-body"> <h5 class="card-title">Card title</h5> <p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p> <a href="#" class="btn btn-primary">Go somewhere</a> </div> </div> </div>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM