html标记的继承,我知道有一些标记是能够继承父标记的属性,有些是不能继承的,能继承的有哪些?

html标记的继承,我知道有一些标记是能够继承父标记的属性,有些是不能继承的,能继承的有哪些?,第1张

应该是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, speaknumeral,speak-punctuation, speak, speechrate,stress, text-align, text-indent, texttransform,visibility, voice-family, volume, whitespace,widows, word-spacing

body定义了margin-top 50px,所以相对html的上边来说,它有50px的空档。menu没有定义margin,相对于body来说,它是紧贴着body的,它们之间没有空档,但是相对于html来,它同样也有50px的空档。menu h2也是同样的道理,这个要看你的参照物了。你可以把html理解为最外围的一个方框,它里面包含了所有内容,然后body是第二个方框,再然后就是里面其它的内容了,这样你在纸上画几个方框,一目了然的。


欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zaji/7593493.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-07
下一篇 2023-04-07

发表评论

登录后才能评论

评论列表(0条)

保存