Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/88.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html CSS边框折叠don';我无法处理价值崩溃_Html_Css - Fatal编程技术网

Html CSS边框折叠don';我无法处理价值崩溃

Html CSS边框折叠don';我无法处理价值崩溃,html,css,Html,Css,我使用了css属性border collapse:collapse,但它似乎不起作用 这是html <table cellspacing="0"> <tr> <td>This is demo</td> <td>This is demo</td> </tr> <tr> <td>This is demo</td>

我使用了css属性
border collapse:collapse
,但它似乎不起作用

这是html

<table cellspacing="0">
    <tr>
        <td>This is demo</td>
        <td>This is demo</td>
    </tr>
    <tr>
        <td>This is demo</td>
        <td>This is demo</td>
    </tr>
    <tr>
        <td>This is demo</td>
        <td>This is demo</td>
    </tr>
</table>   

您需要在表上而不是在td上应用该属性

table {
    border-collapse:collapse;
}
table tr td {
    border: 2px solid red;
}

您需要在表上而不是在td上应用该属性

table {
    border-collapse:collapse;
}
table tr td {
    border: 2px solid red;
}

将其应用于表而非TDT将其应用于表而非td