首页 > 试题广场 >

当元素的一个继承属性没有指定值时,则取父元素的同属性的计算值

[不定项选择题]
当元素的一个继承属性没有指定值时,则取父元素的同属性的计算值,以下哪些不是 CSS 中的继承属性?
  • color
  • display
  • border-style
  • text-align

一、无承性的

1、display:规定元素应该生成的框的类型

2、文本属性:

vertical-align:垂直文本对齐

text-decoration:规定添加到文本的装饰

text-shadow:文本阴影效果

white-space:空白符的处理

unicode-bidi:设置文本的方向

3、盒子模型的属性:widthheightmargin margin-topmargin-rightmargin-bottommargin-leftborderborder-styleborder-top-styleborder-right-styleborder-bottom-styleborder-left-styleborder-widthborder-top-widthborder-right-rightborder-bottom-widthborder-left-widthborder-colorborder-top-colorborder-right-colorborder-bottom-colorborder-left-colorborder-topborder-rightborder-bottomborder-leftpaddingpadding-toppadding-rightpadding-bottompadding-left

4、背景属性:backgroundbackground-colorbackground-imagebackground-repeatbackground-positionbackground-attachment

5、定位属性:floatclearpositiontoprightbottomleftmin-widthmin-heightmax-widthmax-heightoverflowclipz-index

6、生成内容属性:contentcounter-resetcounter-increment

7、轮廓样式属性:outline-styleoutline-widthoutline-coloroutline

8、页面样式属性:sizepage-break-beforepage-break-after

9、声音样式属性:pause-beforepause-afterpausecue-beforecue-aftercueplay-during

 

二、有承性的

1、字体系列属性

font:组合字体

font-family:规定元素的字体系列

font-weight:设置字体的粗细

font-size:设置字体的尺寸

font-style:定义字体的风格

font-variant:设置小型大写字母的字体显示文本,这意味着所有的小写字母均会被转换为大写,但是所有使用小型大写字体的字母与其余文本相比,其字体尺寸更小。

font-stretch:对当前的 font-family 进行伸缩变形。所有主流浏览器都不支持。

font-size-adjust:为某个元素规定一个 aspect 值,这样就可以保持首选字体的 x-height

2、文本系列属性

text-indent:文本缩进

text-align:文本水平对齐

line-height:行高

word-spacing:增加或减少单词间的空白(即字间隔)

letter-spacing:增加或减少字符间的空白(字符间距)

text-transform:控制文本大小写

direction:规定文本的书写方向

color:文本颜色

3、元素可见性:visibility

4、表格布局属性:caption-sideborder-collapseborder-spacingempty-cellstable-layout

5、列表布局属性:list-style-typelist-style-imagelist-style-positionlist-style

6、生成内容属性:quotes

7、光标属性:cursor

8、页面样式属性:pagepage-break-insidewindowsorphans

9、声音样式属性:speakspeak-punctuationspeak-numeralspeak-headerspeech-ratevolumevoice-familypitchpitch-rangestressrichness、、azimuthelevation

 

三、所有元素可以承的

1、元素可见性:visibility

2、光标属性:cursor

 

四、内联元素可以承的

1、字体系列属性

2、除text-indenttext-align之外的文本系列属性

 

五、块级元素可以承的

1、text-indenttext-align
发表于 2020-10-07 14:10:27 回复(10)

不可继承:display,margin,border,padding,background,height,width,position(百度的)

发表于 2019-02-14 23:13:47 回复(3)
这是考记忆力吗
发表于 2020-11-10 10:44:33 回复(1)
跟文字相关的一般都是继承属性
发表于 2022-02-02 12:58:58 回复(0)
看反了。。。
发表于 2021-07-30 13:44:51 回复(0)
好怪,dispplay给父级加上,子级一起没,为啥不是继承
发表于 2021-03-09 21:28:25 回复(2)
  1. font 字体
  2. text 文本
  3. 鼠标属性
发表于 2020-05-12 11:32:18 回复(0)
与文字相关的大部分是可以继承的,其余就需要特殊记忆了
发表于 2022-10-30 21:16:45 回复(0)