Home  >  Article  >  Web Front-end  >  一道html的面试题_html/css_WEB-ITnose

一道html的面试题_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:42:051210browse

现在有一个3*3的table,说怎么写能实现把最中间的表格加一个竖线,分成两个表格,其他的不变,仅用html知识,求各位大神解答。


回复讨论(解决方案)

用colgroup?

这问题很吭,或者是你没理解.
开始说了就一table(表格),中间哪还有表格?是单元格(td)吗?
还加竖线?这是在作画吗?一招过去就成俩table了?

综上所述,考点应是拆分单元格.

3*3 的table,中间td拆分成2列,与其对应列的td colspan 2.

就是三楼的意思,怎么拆分单元格?代码应该怎么写

就是三楼的意思,怎么拆分单元格?代码应该怎么写




这问题很吭,或者是你没理解.
开始说了就一table(表格),中间哪还有表格?是单元格(td)吗?
还加竖线?这是在作画吗?一招过去就成俩table了?

综上所述,考点应是拆分单元格.

3*3 的table,中间td拆分成2列,与其对应列的td colspan 2.


动手画一下.

很简单啊

<table border="1">	<tr>		<td>1-1</td>		<td colspan="2">1-2</td>		<td>1-3</td>	</tr>	<tr>		<td>2-1</td>		<td>A</td>		<td>B</td>		<td>2-3</td>	</tr>	<tr>		<td>3-1</td>		<td colspan="2">3-2</td>		<td>3-3</td>	</tr></table>

colspan rowspan都是拆分单元格用的。。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn