- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用 CSS 创建不规则的网格布局。到目前为止,这是我的 Jfiddle:
代码:
HTML:
<div style="width:275px;">
<div class="box" id="box1"></div>
<div class="box" id="box2"></div>
<div class="box" id="box4"></div>
<div class="box" id="box5"></div>
<div class="box" id="box3"></div>
<div class="box" id="box6"></div>
</div>
CSS:
.box { margin: 2px; float:left; }
#box1 { height: 86px; width: 80px; background-color: red;}
#box2 { height: 42px; width: 161px; background-color: green;}
#box3 { height: 42px; width: 80px; background-color: blue;}
#box4 { height: 86px; width: 80px; background-color: orange;}
#box5 { height: 129px; width: 80px; background-color: yellow;}
#box6 { height: 42px; width: 161px; background-color: brown;}
我想做的是向上移动蓝色 block (在红色 block 的正下方),这将允许棕色 block 向左和向上移动。下面是它当前的外观与我正在尝试做的事情的对比图。
希望这是足够的信息,如果您需要更多信息,我很乐意澄清。我知道像素略有偏差,它大约是我正在寻找的大小的四分之一,所以我将所有像素定义除以 4,这导致了一些我忽略的小数(并导致线条不能完美匹配)。
最佳答案
“脏”解决方案,边距为负,但是...
.box { margin: 2px; float:left; }
#box1 { height: 86px; width: 80px; background-color: red;}
#box2 { height: 42px; width: 161px; background-color: green;}
#box3 { height: 42px; width: 80px; background-color: blue;margin-top:-87px;}
#box4 { height: 86px; width: 80px; background-color: orange;}
#box5 { height: 129px; width: 80px; background-color: yellow;}
#box6 { height: 40px; width: 163px; background-color: brown;margin-top:-42px;}
关于html - CSS:不规则网格布局,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22546149/
negExpression : (NOT^)* primitiveElement ; 是我的规矩。我现在有这个代码: !!(1==1) 我希望我最终会得到这棵树: NOT | NOT
我遇到以下问题,我正在创建一个作为预算副本的表单,但这种类型的预算不包含增值税%,并且商品不会通过会计。 问题如下我创建了一个名为budget.table的模型如下: class TableEleme
我对 Java 相当陌生,但对一般编程不太熟悉。我在 Windows Vista 上使用 Java 1.7.0_07。我正在尝试弄清楚如何使 Swing Timer 定期计时。 我注意到,即使我设置了
我有一个静态站点,它突然显示不规则的标题。这是一个包含大量 JavaScript 的单一页面,包括页面顶部的表格选择。该网站六个月前运行良好。现在,我在 12 个不同的导航选项卡中的一半上看到无法解释
在我参加的 CS 类(class)中,有一个不规则语言的例子: {a^nb^n | n >= 0} 我可以理解它是不规则的,因为没有有限状态自动机/机器可以编写来验证和接受此输入,因为它缺少内存组件。
给定以下高频但稀疏的时间序列: #Sparse Timeseries dti1 = pd.date_range(start=datetime(2015,8,1,9,0,0),periods=10,fr
我有 X、Y、Z 格式的数据,其中所有数据都是一维数组,Z 是坐标 (X,Y) 处的测量幅度。我想将此数据显示为等高线或“imshow”图,其中等高线/颜色代表 Z 值(幅度)。 用于测量和 X 和
这是 Stackoverflow 上的一个递归问题,但给出的解决方案 here仍然不完美。对我来说,屈服仍然是 python 中最复杂的东西之一,所以我不知道如何自己修复它。 当给定函数的任何列表中的
我使用 PHP 5.3.3 在 RHEL 6 服务器上部署了一个 symfony 1.4 项目。我不定期地在 php 错误日志中收到条目,提示找不到 sfProjectConfiguration 并且
我是一名优秀的程序员,十分优秀!