css sets the attributes of the table: 1. border-collapse attribute, collapse table border; 2. padding attribute; 3. border-spacing attribute; 4. caption-side attribute; 5. empty-cells attribute; 6 , table-layout attribute.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
CSS table:
##Properties |
Description |
##border-collapse
|
Set whether to merge table borders into a single border.
|
border-spacing
|
Set the dividing cell border distance.
|
##Set the position of the table title . |
|
Set whether to display in the table of empty cells. |
##table-layout |
##Set display unit, row and column algorithm. |
1. Collapse table border: border-collapse attribute |
(1) Function: Set whether the borders of the table are merged into a single border, or displayed separately like in standard HTML;
(2) Supplement Knowledge point: The table has a double line border. This is because the table, th and td elements have independent borders.
(3) Possible values:
##Value
Description |
##separate |
||||||||||||||||||||||||||||
##collapse
| ##If possible, the borders will be merged into A single border. The border-spacing and empty-cells properties are ignored. |||||||||||||||||||||||||||||
## Specifies that the border should be inherited from the parent element The value of the -collapse attribute. |
|||||||||||||||||||||||||||||
(4) Browser support: All major browsers support the border-collapse attribute. Ps: Must specify !DOCTYPE, otherwise border-collapse may produce unexpected results. 2. Table inner margin: padding attribute #Function: Control the content and content in the table For the distance of the border, please set the padding attribute for the td and th elements; 3. Border separation: border-spacing attribute (1) Function: This attribute specifies the distance between cell boundaries in the separated border model. This property is ignored unless border-collapse is set to separate. Although this property only applies to tables, it is inherited by all elements in the table. (2) Possible values: ##Value describe length length Specifies the distance between the borders of adjacent cells. Use units such as px, cm, etc. Negative values are not allowed. If you define a length parameter, then the horizontal and vertical spacing is defined. If two length parameters are defined, then the first sets the horizontal spacing, and the second sets the vertical spacing.
4. Table title: caption-side attribute (1) Function: Set the position of the table title, This property specifies the placement of the table title relative to the table frame. The table title is displayed as if it were a block-level element before (or after) the table. (2) Possible values:
default value. Position the table title above the table. ##bottom ## Position the table title within the table Down. ##inherit (3) Browser compatibility: All mainstream browsers except IE support the caption-side attribute. Internet Explorer 8 (and later) supports the caption-side attribute if !DOCTYPE is specified. 5. Processing of empty cells: empty-cells attribute (1) Function: This attribute definition How to represent table cells that contain no content. If displayed, the cell's borders and background are drawn. This property is ignored unless border-collapse is set to separate. (2) Possible values: ##Value Description
## Specifies that empty should be inherited from the parent element The value of the -cells attribute.
(3) Browser compatibility: All browsers except IE support the empty-cells attribute. Internet Explorer 8 (and later) supports the empty-cells attribute if !DOCTYPE is specified. 6. Table layout algorithm: table-layout attribute (1) Function: to display table cells , Algorithm rules for rows and columns. This attribute specifies the layout algorithm used to complete the table layout. (2) Two algorithms: Fixed table layout: fixed #Advantages: Allows the browser to layout the table faster, (in a fixed table layout, the horizontal layout only depends on the table width, column width, table border width, and cell spacing, and is not related to the table width, column width, table border width, and cell spacing. The content of the cell is irrelevant. By using a fixed table layout, the user agent can display the table after receiving the first row.); #Disadvantages: Not very flexible. ,,,,,,,,,,,,,,, In automatic table layout, the width of the column is set by the widest content in the column cell without a row break.); (3) Possible values:
##Value Description ##automatic
##fixed ## Specifies that table should be inherited from the parent element -The value of the layout attribute. (Learning video sharing: |
The above is the detailed content of What are the properties of css setting table?. For more information, please follow other related articles on the PHP Chinese website!

在css中,可用list-style-type属性来去掉ul的圆点标记,语法为“ul{list-style-type:none}”;list-style-type属性可设置列表项标记的类型,当值为“none”可不定义标记,也可去除已有标记。

区别是:css是层叠样式表单,是将样式信息与网页内容分离的一种标记语言,主要用来设计网页的样式,还可以对网页各元素进行格式化;xml是可扩展标记语言,是一种数据存储语言,用于使用简单的标记描述数据,将文档分成许多部件并对这些部件加以标识。

在css中,可以利用cursor属性实现鼠标隐藏效果,该属性用于定义鼠标指针放在一个元素边界范围内时所用的光标形状,当属性值设置为none时,就可以实现鼠标隐藏效果,语法为“元素{cursor:none}”。

转换方法:1、给英文元素添加“text-transform: uppercase;”样式,可将所有的英文字母都变成大写;2、给英文元素添加“text-transform:capitalize;”样式,可将英文文本中每个单词的首字母变为大写。

在css中,rtl是“right-to-left”的缩写,是从右往左的意思,指的是内联内容从右往左依次排布,是direction属性的一个属性值;该属性规定了文本的方向和书写方向,语法为“元素{direction:rtl}”。

在css中,可以利用“font-style”属性设置i元素不是斜体样式,该属性用于指定文本的字体样式,当属性值设置为“normal”时,会显示元素的标准字体样式,语法为“i元素{font-style:normal}”。

在css3中,可以用“transform-origin”属性设置rotate的旋转中心点,该属性可更改转换元素的位置,第一个参数设置x轴的旋转位置,第二个参数设置y轴旋转位置,语法为“transform-origin:x轴位置 y轴位置”。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Notepad++7.3.1
Easy-to-use and free code editor
