Home >Web Front-end >HTML Tutorial >table 中如何画一条线?加一个tr的话,线长度不够100%。_html/css_WEB-ITnose

table 中如何画一条线?加一个tr的话,线长度不够100%。_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-21 09:23:511549browse

<tr  style="background:#000000;height:1px;width:100%">		<td height="1px;"></td></tr>

这样的话,线总是有一点不到边上,怎么样才能让线100%占据表格?


 <table style="background: #0CA3DC" border="0">		<tr>		<td height="20px;">aaaaaaaa</td>		</tr>		<tr  style="background:#000000;height:1px;width:100%">		<td height="1px;"></td>		</tr>		<tr>		<td>bbbbb</td>		</tr>		<tr> </tr></table>


回复讨论(解决方案)

table加border-collapse:collapse

border-collapse: collapse;

你这样和作边框有什么差?为什么不直接用边框?

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