哪些CSS属性可以继承

来源:互联网 发布:qq空间推广淘宝 编辑:程序博客网 时间:2024/04/28 06:51

给某个父元素设置CSS样式,同时也会作用在子元素上,叫继承(inherit)

(X)HTML元素可以从其父元素那里继承部分CSS属性,即使当前元素并没有定义该属性。

可以继承的属性有:

azimuth

border-collapse

border-spacing

caption-side

color

cursor

direction

elevation

empty-cells

font-family font-size

font-style

font-variant

font-weight

font

letter-spacing

line-height

list-style-image

list-style-position

list-style-type

list-style

orphans

pitch-range

pitch quotes

richness

speak-header

speak-numeral

speak-punctuation

speak

speech-rate

stress

text-align

text-index

text-transform

visibility

voice-family

volume

white-space

widows

word-spacing


不可继承的属性有:

display

margin

border

padding

background

height

min-height

max-height

width

min-width

max-width

overflow

position

left

right

top

bottom

z-index

float

clear

table-layout

vertical-align

page-break-after

page-bread-before

unicode-bidi

0 0
原创粉丝点击