html - 如何在不使用媒体查询的情况下填充 div 的空白?

标签 html css twitter-bootstrap

我正在使用 Bootstrap 卡在桌面上构建此布局:

enter image description here

到目前为止一切顺利,在此宽度下一切正常:

enter image description here

但是从这个宽度到桌面宽度容器没有被填满:

enter image description here

用图像构建卡片的 HTML 是:

<div class="card h-60">
                    <div>
                            <div class="row box">
                                    <div class="box-content formal">
                                            <div class="col-md-12">
                                                    <img class="imageban" src="img/crm.png" />
                                                    <span><b>CRM</b></span>
                                            </div>
                                    </div>
                                <div class="box-right">
                                    <a href="#">
                                        <img class="img-responsive" src="img/img1.jpg"/>
                                    </a>
                                </div>
                            </div>
                    </div> 
                    <div>
                        <div class="row box">
                                <div class="box-content report">
                                        <div class="col-md-12">
                                                <img class="imageban" src="img/report.png" />
                                                <span><b>Report</b></span>
                                        </div>
                                </div>
                            <div class="box-right">
                                <a href="#">
                                    <img class="imageban" src="img/img4.jpg"/>
                                </a>
                            </div>
                        </div>
                    </div> 
                    <div>
                        <div class="row box">
                            <div class="box-content formal">
                                    <div class="col-md-12">
                                            <img class="img-responsive" src="img/formal_notices.png" />
                                            <span><b>Formal Notices</b></span>
                                    </div>
                            </div>
                            <div class="box-content text">
                                <a href="#">
                                    Open the Formal <br>Notice Document <br>Library
                                </a>
                            </div>
                        </div>
                    </div> 
            </div>

CSS 只有这一行:

 .row.box{
     max-width: 345px;
 }

我被困在这个问题上,任何帮助都会很好。谢谢。

最佳答案

您可以删除类 .box 并使用 Bootstrap 类代替 col-md-4 col-xs-12。

关于html - 如何在不使用媒体查询的情况下填充 div 的空白?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49375091/

相关文章:

javascript - 选项卡 Angular 和 Bootstrap

html - Bootstrap 下拉菜单在悬停时保持状态

javascript - 如何限制移动网站的滚动但允许访问可能缩回的地址栏

php - 在不使用 API 和库但使用标题类型的情况下将 Html + CSS 页面呈现为 PDF

css - 将 2 个框对齐,其中一个框的位置为 : fixed;

html - 如何在我的案例中构建模态

jquery数据表没有完全占据宽度

html - 如何正确对齐堆叠的 Font-Awesome 图标

javascript - 如何只显示 div 的前几行(夹紧)?

javascript - 如何在 Jquery 选择/选项过滤系统中保留最后的首选项?