我正在使用 mattable,假设我有 26 条记录,那么我需要在 Column1 中显示前 10 条记录,在第 2 列中显示接下来的 10 条记录,在第 3 列中显示接下来的 6 条记录。他们有什么方法可以用 CSS 实现吗?
最佳答案
使用显示 flex
html
<div class="main-row">
<div class="col">
</div>
<div class="col">
</div>
<div class="col">
</div>
</div>
CSS
.main-row{
display:flex;
}
.col{
flex-grow:1;
height:150px;
background-color:#e5e5e5;
margin:0px 2px;
}
关于html - 将行平均分为 3 列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53128055/