Home>Article>Web Front-end> How to use css tab-size attribute
css tab-size attribute definition and usage
In css, the tab-size attribute is used to specify the tab character (tab) The space length of the character. In HTML, the tab character is usually displayed as a single space character. Except for some elements, such as
The tab-size attribute is a new attribute in css3. Currently, only the Chrome browser supports the tab-size attribute; the Firefox browser supports the -moz-tab-size attribute to replace this attribute; the Opera browser supports -o -tab-size attribute to replace this attribute. No browser supports this value as a length unit.
css tab-size attribute syntax format
css syntax: tab-size: number/length/initial/inherit
JavaScript syntax: object. style.tableLayout="fixed"
Attribute value says
number: Specifies the number of space characters to be displayed for each tab character (default value is 8)
length: Specifies the length of the tab character (almost all mainstream browsers do not yet support this attribute value)
initial: Set this attribute to its Default value
inherit: inherit the value of the tab-size attribute from the parent element
Example
css tab-size属性制表符的空格长度 I use tab-size 4I use tab-size 16目前只有Chrome支持 tab-size属性。
Firefox支持可替代该属性的属性-moz-tab-size属性。
Opera支持可替代该属性的属性-o-tab-size属性。
The above is the detailed content of How to use css tab-size attribute. For more information, please follow other related articles on the PHP Chinese website!