【问题标题】:How to make custom columns css? [duplicate]如何制作自定义列css? [复制]
【发布时间】:2018-08-02 13:20:52
【问题描述】:

使用 Bootstrap 或 W3 很容易,但在此应用程序中,我不想使用它来制作列。如何使用纯 CSS 处理列问题? 我需要做这样的事情:

我再说一遍……不使用 bootstrap、w3 或任何其他 css 框架,我该怎么做。

这是我的简单 HTML 代码:

<div style="width: 50px; float: left">
  << Prev
</div>
<div style="float: left">
  <h1>Some Info... this is the responsive div. Always the rest of the size extracting the 50px of the other divs</h1>
</div>
<div style="width: 50px; float: left">
  Next >>
</div>

【问题讨论】:

标签: html css css-multicolumn-layout


【解决方案1】:

你可以使用弹性框:

.container {
  display: flex;
  height: 200px;
}

.side {
  width: 50px;
  height: 100%;
  background: purple;
}

.middle {
  flex-grow: 1;
  background: blue;
}
<div class="container">
  <div class="side"></div>
  <div class="middle"></div>
  <div class="side"></div>
</div>

【讨论】:

  • flex conainer不需要指定宽度100%
猜你喜欢
  • 2016-10-16
  • 1970-01-01
  • 1970-01-01
  • 2022-01-21
  • 2012-06-13
  • 1970-01-01
  • 1970-01-01
  • 2018-05-12
  • 1970-01-01
相关资源
最近更新 更多