【问题标题】:How to build square boxes using Bootstrap Panels如何使用引导面板构建方盒
【发布时间】:2022-01-12 08:22:41
【问题描述】:


 <div class="row">
        <h3>Dashboard</h3>
 </div>

如何使用引导程序在仪表板 div 中添加这些框?

我在尝试


 <div class = "panel panel-primary">
            <div class="panel-heading panel-sm" style="padding: 5px 15px;">Statistics</div>
        </div>

但是,我希望它们的内部是方形的,这样我就可以包含有关任务列表的信息。

【问题讨论】:

  • 小提琴会很棒。

标签: html css jsp bootstrap-4


【解决方案1】:

您可以为正方形指定固定的高度和宽度 或者你可以这样做

<div class="box">data</div>

css:

.box
{
  height: 0px;
  padding-bottom: 100%;
  position: relative;
}

所有的孩子都应该是 position: absolute 。

【讨论】:

  • 谢谢,请问如何设置框之间的间距?
  • 给每个盒子留出边距 {margin: 10px}。
猜你喜欢
  • 2014-04-06
  • 1970-01-01
  • 1970-01-01
  • 2016-01-02
  • 2017-01-14
  • 2017-06-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多