How to use css border-collapse property

青灯夜游
Release: 2019-05-30 09:34:05
Original
4084 people have browsed it

The border-collapse attribute is used for table elements and can be used to set the two borders of the table to merge into a single border. All major browsers support the border-collapse attribute.

How to use css border-collapse property

How to use the css border-collapse property?

The border-collapse property sets whether the table's borders are collapsed into a single border, or displayed separately as in standard HTML.

Syntax:

border-collapse: separate|collapse|inherit;
Copy after login

Attribute value:

● separate: default value. The borders will be separated. The border-spacing and empty-cells properties are not ignored.

●Collapse: If possible, the borders will be merged into a single border. The border-spacing and empty-cells properties are ignored.

● Inherit: Specifies that the value of the border-collapse attribute should be inherited from the parent element.

Note:All major browsers support the border-collapse attribute. The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8). If !DOCTYPE is not specified, border-collapse may produce unexpected results.

css border-collapse property example

     
姓名 年龄
Bill 20
Steven 25
Copy after login

Rendering:

How to use css border-collapse property

The above is the detailed content of How to use css border-collapse property. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
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
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!