html中元素属性的继承

html中元素属性的继承,第1张

<body>

 <div style="border: 1px red solid width: 200px height: 300px">

  <p id="pp" style="border: 1px blue solid">这是一段中的内容

       <h3>标题栏<h3/><!--<h3>标题栏<h3/>这个地方你写错了,正确的是</h3>(注意‘/’的前后位置),结果就是等于没写一样,也就是说<h3>没结束,所以后面你写再多个<p>也会出现这种情况-->

  

  </p>

  <p style="border: 1px blue solid">这是二段中的内容</p>

 </div>

</body><

应该是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


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

原文地址: https://outofmemory.cn/zaji/7166904.html

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

发表评论

登录后才能评论

评论列表(0条)

保存