Property inheritance in CSS

1. Non-inheritable properties

1. display : Specifies the type of box that the element should generate

2. Text attributes :

		vertical-align:垂直文本对齐
		
		text-decoration:规定添加到文本的装饰
		
		text-shadow:文本阴影效果
		
		white-space:空白符的处理
		
		unicode-bidi:设置文本的方向

3. The attributes of the box model :

		width、height、margin 、margin-top、margin-right、margin-bottom、margin-left、
		border、border-style、border-top-style、border-right-style、border-bottom-style、
		border-left-style、border-width、border-top-width、border-right-right、
		border-bottom-width、border-left-width、border-color、border-top-color、
		border-right-color、border-bottom-color、border-left-color、border-top、border-right、
		border-bottom、border-left、padding、padding-top、padding-right、padding-bottom、
		padding-left

4. Background attributes :

		background、background-color、background-image、background-repeat、
		background-position、background-attachment

5. Positioning attributes :

		float、clear、position、top、right、bottom、left、min-width、min-height、max-width、
		max-height、overflow、clip、z-index

6. Generate content attributes : content, counter-reset, counter-increment

7. Outline style attributes : outline-style, outline-width, outline-color, outline

8. Page style attributes : size, page-break-before, page-break-after

9、声音样式属性:pause-before、pause-after、pause、cue-before、cue-after、cue、play-during

2. Inheritable attributes

1. Font family attributes

font: combined font

font-family: Specifies the font family of the element

font-weight: Set the weight of the font

font-size: Set the font size

font-style: defines the style of the font

font-variant: Set the font of small capital letters to display text, which means that all lowercase letters will be converted to uppercase, but all letters using small capital fonts have a smaller font size compared to the rest of the text.

font-stretch: Stretch and transform the current font-family. Not supported by all major browsers.

font-size-adjust: Specify an aspect value for an element so that the x-height of the preferred font can be maintained.

2. Text series attributes

text-indent: text indent

text-align: horizontal alignment of text

line-height: line height

word-spacing: increase or decrease the white space between words (ie word spacing)

letter-spacing: increase or decrease the space between characters (character spacing)

text-transform: control text case

direction: Specifies the writing direction of the text

color: text color

3. Element visibility : visibility

4. Table layout attributes : caption-side, border-collapse, border-spacing, empty-cells, table-layout

5. List layout attributes : list-style-type, list-style-image, list-style-position, list-style

6. Generate content attributes : quotes

7. Cursor attribute : cursor

8. Page style attributes : page, page-break-inside, windows, orphans

9、声音样式属性:speak、speak-punctuation、speak-numeral、speak-header、speech-rate、volume、voice-family、pitch、pitch-range、stress、richness、、azimuth、elevation

Three, all elements can inherit attributes

1. Element visibility : visibility

2. Cursor attribute : cursor

Fourth, the attributes that inline elements can inherit

1. Font family attributes

2. Text series attributes other than text-indent and text-align

Five, the attributes that block-level elements can inherit

1、text-indent、text-align

Guess you like

Origin blog.csdn.net/sjs1995/article/details/107986955