Home >Web Front-end >CSS Tutorial >Detailed explanation of the use of css border-collapse
Name: border-collapse
Category: Table
## Brief description: Set whether the edges of rows and cells are merged
Overview: border-collapse is to set whether there is a distance between the rows a34de1251f0d9fe1e645927f19a896e8 or b6c5a531a458a2e790c1fd6421739d1c of the table Style, the distance between a34de1251f0d9fe1e645927f19a896e8 and b6c5a531a458a2e790c1fd6421739d1c can be achieved by border="xxx" and cellspacing="xxx" in the table. In other words, when border-collapse is set to collapse, the border and cellspacingproperties of the table itself have no effect.
Syntax:
Value:
separate:Default value. Borders independent (standard HTML)collapse: Adjacent edges are merged
border-collapse : separate | collapse
Code:
Display effect:
<table width ="200" border="1" cellspacing="3" cellpadding="2" style="border-collapse:collapse"> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table>
Code:
<table width="200" border="1" cellspacing="3" cellpadding="2" style="border-collapse: separate"> <tr> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> </tr> </table>The display effect is:
The above is the detailed content of Detailed explanation of the use of css border-collapse. For more information, please follow other related articles on the PHP Chinese website!