元素分类与属性继承

元素分类与属性继承

一:元素分类

常见内联元素(不可设宽高,不独占一行):a,span,strong,em,label,button,small,strike,textarea,br;

常见内联块元素(可设宽高,不独占一行):img,input,button;

常见块状元素(可设宽高,独占一行):div,h1~h6,p,ul,li,table,form,dl;

二:样式继承

1 不可继承:

display,margin,padding,border,background,height.min-height,max-height,width,max-width,min-width,overflow,

position,left,right,top,bottom,z-index,float,vertical-align,clear;

2 所有元素可继承:

visibility,cursor;color,font,font-color,font-family,font-style,font-weight,font-variant,font-size,line-height,,text-decoration,text-transform

3 内联元素可继承:

letter-spacing,word-spacing,white-spacing,;

4 块状元素可继承:

list-style,list-style-position,list-style-type,list-style-image;

猜你喜欢

转载自blog.csdn.net/qq_41179401/article/details/79900494