Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the border-collapse attribute in CSS

Shulou Source: shulou.com Published: 2022-06-01 12:33:33 11月12日 Update

This article mainly shows you "how to use the border-collapse attribute in CSS", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use the border-collapse attribute in CSS" this article.

The meaning of the border-collapse attribute:

The border-collapse property is used to set whether the borders of the table are merged into a single border, or whether the border rear border is set to display separately in table.

Value of the border-collapse attribute

Separate

This property value indicates that the border will be separated, and the border-spacing and empty-cells properties will not be ignored. It is the default property value.

Border-spacing: refers to the distance between the borders of adjacent cells, so we can use this property to set the spacing between borders

Empty-cells: refers to whether to display empty cells in a table

Note: both properties can only be used in a detached border

Table {

Font-size:16px

Color:#333333

Border-collapse:separate

Border-spacing:12px

}

Th {

Border:1pxsolid#444

Padding:25px

}

Td {

Border:1pxsolid#444

Padding:15px

}

Tr {

Background:rgb (207238252)

}

The above is all the content of the article "how to use the border-collapse attribute in CSS". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Attributes borders content articles units tables learning help two between representatives can be passed meaning easy to understand more organization knowledge editing industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia OPPO Reno Apple MySQL Linux