你怎么能创建这样的行/ colspan? (为了清楚起见,包含示例 [英] How can you create a row/colspan like this? (Example included for clarity)

查看:113
本文介绍了你怎么能创建这样的行/ colspan? (为了清楚起见,包含示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I want a specific sort of coll span like this C stands for Row/Coll-spanned

我想要一个特定类型的coll span,像这样C代表Row / Coll- spanned --- |
| | C |
| ------- |
| C | C |
| ------- |

|-------| | | C | |-------| | C | C | |-------|

为了更加清晰,这是一个简单的coll-span和图像的代码。
$ b

for more clarity this is the code of a simple coll-span and image

<table>
<tr>
<td colspan='2'> </td>
</tr> 
<tr>
 <td></td><td></td>
</tr> 
</table>

给出

gives

|-------|
| C | C | 
|-------|
|   |   | 
|-------|

这甚至可能是我想要的吗?

is this even possible what I want above?

推荐答案

横跨单元格的行和/或列(合并单元格)只能是矩形。以这种方式创建L形单元是没有办法的。你可以做的最好的是创建一个2x2单元格,并在左上角放置一些东西,使其看起来像是一个L形单元格。这会产生一个主要问题:没有办法将这个内部块的宽度与它应该占据的列的宽度联系起来。固定列和这个块的宽度将主要解决这个问题。

With row and/or column spanning the cell (merged cells) can only be rectangular. There is no way of creating an L-shaped cell this way. The best you can do is create a 2x2 cell and put something in the top left corner to make it appear like there is an L-shaped cell. This will have one major problem: there's no way to tie the width of this inner block to the width of the column it's supposedly in. Fixing the width of the column and this block will mostly solve this problem.

这篇关于你怎么能创建这样的行/ colspan? (为了清楚起见,包含示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆