Home >Web Front-end >Front-end Q&A >How to set tr spacing in css

How to set tr spacing in css

藏色散人
藏色散人Original
2021-06-08 11:24:252763browse

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*/
}

or

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

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!

Statement:
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