HTML表格单元格定位元素,使它们堆叠在单元格的特定区域[关闭](HTML table cell positioning elements so that they are stacked in a

编程入门 行业动态 更新时间:2024-10-28 19:31:19
HTML表格单元格定位元素,使它们堆叠在单元格的特定区域[关闭](HTML table cell positioning elements so that they are stacked in a specific area of the cell [closed])

如何将元素放置在html表格单元格中,以便一个元素位于左侧并居中,而另外两个元素位于第一个元素的侧面并且彼此堆叠。

例如:

狗男性女性

狗将在左侧居中,而雄性和雌性将在彼此的顶部并且在第三个细胞中垂直居中。

How would you position elements in an html table th cell so that one element is on the left side and is centered while another two elements are positioned to the side of the first element and are stacked on top of one another.

For example:

dog male female

dog would be centered on the left hand side while male and female would be on top of one another and centered vertically in the th cell.

最满意答案

我不知道这是否是你需要的。 但是我试着table within a table做一张table within a table

<table border="1px solid black"> <tr> <td> <table> <tr> <td rowspan="2">Dog</td> <td>male</td> </tr> <tr> <td>female</td> </tr> </table> </td> </tr> </table>

这是一个小提琴样本 。

I dont know if this is what you need. but I tried to do a table within a table thingy

<table border="1px solid black"> <tr> <td> <table> <tr> <td rowspan="2">Dog</td> <td>male</td> </tr> <tr> <td>female</td> </tr> </table> </td> </tr> </table>

Here's a fiddle sample.

更多推荐

本文发布于:2023-08-07 06:47:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1461834.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:单元格   使它   表格   元素   区域

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!