我敢肯定有人在捣乱,但他们让我这么做。
在表中放置一个span标记,span标记中不包含任何内容。以某种方式使span标签宽度为16像素。
没有填充、边距或 。我认为这根本不可能。有可能吗?这是我的HTML/CSS。
.test{
height: 31px;
width: 16px;
background-color: red;
}
<td>16px wide</td>
<td><span class="test"></span></td>
<td>16px wide</td>
简单设置:
.test{
display: inline-block;
width: 16px;
}