带有自定义边框的表格
我正在尝试制作一个类似于以下内容的表格:
这是我的代码:
<table bordercolor="#000000">
<tr>
<th width="200" style="border-right: 2px dashed; border-bottom: 2px dashed;">
Player1 Status
</th>
<th width="200" style="border-right: 2px dashed; border-bottom: 2px dashed;">
Player2 Status
</th>
<th width="200" style="border-right: 2px dashed; border-bottom: 2px dashed;">
Player3 Status
</th>
<th width="200" style="border-bottom: 2px dashed;">
Player4 Status
</th>
</tr>
<tr>
<td width="200" style="border-right: 2px dashed;">Your Trun!</td>
<td width="200" style="border-right: 2px dashed;">Not Your Turn!</td>
<td width="200" style="border-right: 2px dashed;">Not Your Turn!</td>
<td width="200">Not Your Turn!</td>
</tr>
<tr>
<td width="200" style="border-right: 2px dashed;">Remaining Moves: 5</td>
<td width="200" style="border-right: 2px dashed;">Remaining Moves: 5</td>
<td width="200" style="border-right: 2px dashed;">Remaining Moves: 5</td>
<td width="200">Remaining Moves: 5</td>
</tr>
</table>
但我遇到了删除 Your Trun!
语句时出现问题,表格将如下所示:
我该如何解决这个问题?
I'm trying to make a table similar to the following:
Here is my code:
<table bordercolor="#000000">
<tr>
<th width="200" style="border-right: 2px dashed; border-bottom: 2px dashed;">
Player1 Status
</th>
<th width="200" style="border-right: 2px dashed; border-bottom: 2px dashed;">
Player2 Status
</th>
<th width="200" style="border-right: 2px dashed; border-bottom: 2px dashed;">
Player3 Status
</th>
<th width="200" style="border-bottom: 2px dashed;">
Player4 Status
</th>
</tr>
<tr>
<td width="200" style="border-right: 2px dashed;">Your Trun!</td>
<td width="200" style="border-right: 2px dashed;">Not Your Turn!</td>
<td width="200" style="border-right: 2px dashed;">Not Your Turn!</td>
<td width="200">Not Your Turn!</td>
</tr>
<tr>
<td width="200" style="border-right: 2px dashed;">Remaining Moves: 5</td>
<td width="200" style="border-right: 2px dashed;">Remaining Moves: 5</td>
<td width="200" style="border-right: 2px dashed;">Remaining Moves: 5</td>
<td width="200">Remaining Moves: 5</td>
</tr>
</table>
But I have faced a problem when removing Your Trun!
statement, the table will be like this:
How can I solve this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需使用
:
jsFiddle: http://jsfiddle.net/Vgk2W/
Just use
:
jsFiddle: http://jsfiddle.net/Vgk2W/
CSS 属性“空单元格:显示;”也可以在更现代的浏览器中工作
测试: http://jsfiddle.net/Vgk2W/1/
支持: http://www.quirksmode.org/css/tables.html
css property "empty-cells:show;" may also work in more modern browsers
test: http://jsfiddle.net/Vgk2W/1/
support: http://www.quirksmode.org/css/tables.html