当前位置: 首页 > Web前端 > HTML5

程序员前端教程css中的可继承与不可继承属性

时间:2023-04-05 01:31:10 HTML5

css中的可继承和不可继承属性,程序员前端的好教程一、不可继承属性1、display:指定元素应该生成的框的类型2、text属性:vertical-align:垂直文本对齐text-decoration:指定给文本添加的装饰text-shadow:文本阴影效果white-space:空白字符的处理unicode-bidi:设置文本的方向3.框模型的属性:width,height,margin,margin-top,margin-right,margin-bottom,margin-left,border,border-style,border-top(right,bottom,left)-styleborder-top(right,bottom,left)-宽度,border-top(right,bottom,left)-color,border-top,border-right,border-bottom,border-left,padding,padding-top,padding-right,padding-bottom,padding-left4.背景属性:背景、背景颜色、背景图像、背景重复、背景位置、背景附件5。定位属性:float,clear,position,top,right,bottom,left,min-width,min-height,max-width,max-height,overflow,clip,z-index6。生成内容属性:content、content-seset、content-increment7。轮廓样式属性:outline、outline-style、outline-width、outline-color8。页面样式属性:size、page-break-before、page-break-after9。声音风格属性:pause、pause-before、pause-after、cue、cue-before、cue-after、play-duringII。继承属性1.字体家族属性:font:组合字体font-family:指定元素的字体系列font-weight:设置字体的粗细font-size:设置字体的大小font-style:设置字体的样式font-variant:设置小型大写字母的字体显示文本,这意味着所有小写字母都将转换为大写字母,但所有使用小型大写字母的字体都会比文本的其余部分更小font-stretch:拉伸当前字体系列,所有主流浏览器都没有浏览器支持font-size-adjust:为元素指定aspect值,以便可以保持首选字体的x-height2。文本系列属性:text-indent:文本缩进text-align:文本水平对齐line-height:行高word-spacing:增加或减少字与字之间的间距(即字间距)letter-spacing:增加或减少字间距betweencharacters(characterspacing)text-transform:控制文本大小写direction:指定文本的书写方向color:文本颜色3.元素可见性:visibility4.表格布局属性:caption-side,border-collapse,border-spacing,empty-cells,table-layout5.列表布局属性:list-style,list-style-image,list-style-type,list-style-position6.制作内容属性:quotes7。游标属性:cursor8。页面样式属性:page、page-break-inside、Windows、orphans9。声音风格属性:speak,speak-punctuation,Speak-numeral,speak-header,speech-rate,volume,voice-family,pitch,pitch-range,stress,rich,,azimuth,elevation3.所有元素都可以继承属性1.元素可见性:visibility2.光标属性:cursor4.内联元素可以继承的属性1.字体族属性2.除了text-indent和text-align之外的文本系列属性5.block可以继承的属性-level元素1.text-indent,text-align