如何去除<table>标签中的重复的边框

例如:
<table border="1" cellspacing="0" cellpadding="0">
	<tr>
	    <th>选择器</th>
	    <th>类型</th>
	    <th>功能描述</th>
	    <th>Header</th>
	</tr>
        <tr>
            <td>1</td>
            <td>2</td>
            <td>2</td>
            <td>2</td>
        </tr>
</table>

这里的表格是有边框的:

里面的表格的边框是重复的;

当你加入代码:

<style type="text/css">
    table{
	border: 0;
    }
</style>

表格会显示双的重复的线条解决的方法是:

<style type="text/css">
    table{
	border: 0;
        border-collapse: collapse;//去掉重复的边框
     }
</style>




猜你喜欢

转载自blog.csdn.net/logic_ysy/article/details/80100522