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

WBOY
Release: 2016-06-21 09:23:51
Original
1514 people have browsed it

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

这样的话,线总是有一点不到边上,怎么样才能让线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>
Copy after login


回复讨论(解决方案)

table加border-collapse:collapse

border-collapse: collapse;
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template