How to set tr spacing in css

藏色散人
Release: 2021-06-08 11:24:25
Original
2710 people have browsed it

How to set tr spacing in css: first open the corresponding code file; then set tr as a block element; finally set the tr spacing by setting the "margin:2px 0;" style.

How to set tr spacing in css

The operating environment of this article: windows7 system, HTML5&&CSS3 version, DELL G3 computer

The distance between tr can be set by setting the margin of tr ) to implement, but note that the display attribute of tr must first be set to a block element:

tr{
display:block; /*将tr设置为块体元素*/
margin:2px 0;  /*设置tr间距为2px*/
}
Copy after login

or

tr{
line-height:10px;
或者
margin-top:10px;
}
Copy after login

How to set tr spacing in css

Extended information:

Cascading style sheets are a computer language used to express document styles such as HTML or XML. CSS can not only statically modify web pages, but can also cooperate with various scripting languages ​​to dynamically format various elements of web pages.

CSS can perform pixel-level precise control over the layout of element positions in web pages, supports almost all font size styles, and has the ability to edit web page objects and model styles.

Recommended learning: "css video tutorial"

The above is the detailed content of How to set tr spacing in css. 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
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!