CSS 规则在没有类的情况下应用,为什么?
P粉795311321
P粉795311321 2023-09-04 13:26:05
0
1
331
<p>我定义CSS规则:</p> <pre class="brush:php;toolbar:false;">.info-specs h2, h3, h4, h5 { font-size: 1.5em; text-transform: none; }</pre> <p>这应该只适用于类为“info-specs”的元素中的 h5。然而,经过检查,我发现其他h5元素也在使用这个规则。为什么? 下面是一个示例:</p> <p> <pre class="snippet-code-css lang-css prettyprint-override"><code>.info-specs h2, h3, h4, h5 { font-size:5em; text-transform: none; }</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code><h5>mytest </h5></code></pre> </p>
P粉795311321
P粉795311321

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!