jquery - 如何将 DIV 放置在行和列样式中

标签 jquery css html

我正在研究一个结构,我需要以图中所示的方式放置 div。

enter image description here

具有自动宽度但固定高度,不确定如何实现,理想的 HTML 将是

<div class="container">

    <div class="box">1</div>
<div class="box">2</div>
<div class="box">3</div>
<div class="box">4</div>
<div class="box">5</div>
<div class="box">6</div>

</div>

最佳答案

<table>
<tr>
<td>
<table width="100%">
<tr>
<td><div>1</div></td>
<td><div>2</div></td>
<td><div>3</div></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="100%">
<tr>
<td><div>4</div></td>
<td><div>5</div></td>
<td><div>6</div></td>
</tr>
</table>
</td>
</tr>
</table>

关于jquery - 如何将 DIV 放置在行和列样式中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23434191/

相关文章:

javascript - 从表单中添加/删除行。重置整个表单

jquery - 图像在单击时发生变化并恢复

jquery - WPF/XAML 有类似 jquery 的东西吗?

internet-explorer - IE 不接受字体作为初始使用重要

html - 是否有针对 div 内每个元素的 css 选择器查询

html - 输入后隐藏文字

javascript - 用 D3 和 d3.slider 显示 SVG 元素 : Uncaught TypeError: . exit 不是函数

javascript - 如何使用 AJAX 打开 PDF 文件

php - 在 Javascript 和 php 中实现计时器的最佳方法

javascript - 根据媒体屏幕/屏幕宽度缩小导航栏