Detailed explanation of the use of css border-collapse

黄舟
Release: 2017-06-30 09:25:50
Original
2972 people have browsed it
  • 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 or of the table Style, the distance between and 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
    Copy after login
Example 1:

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>
    Copy after login
Example 2:

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>
Copy after login
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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!