简体   繁体   English

Chrome开发者工具&gt;用户代理样式表覆盖<strong>, 规则</strong>

[英]Chrome developer tools > user-agent stylesheet overrides <strong>, <b> rules

I'm working on developing a site for a client. 我正在为客户开发网站。 When working on my CSS in Chrome Developer Tools, it shows: 在Chrome开发人员工具中使用CSS时,它显示:

user agent stylesheet 用户代理样式表

strong, b { 坚强,b {

font-weight: bolder; font-weight:粗体;

} }

The user agent stylesheet is disabling the bold on strong and b elements. 用户代理样式表正在禁用Strong和b元素上的粗体。 What is this? 这是什么? How do I turn it off? 如何关闭它? Everything shows up correctly in Firefox. 一切在Firefox中都能正确显示。 Why is it trying to alter the way I am styling things? 为什么要尝试改变我的造型方式?

When I add this style to a page: 当我将此样式添加到页面时:

<style>
strong {
    font-weight: normal;
}
</style>

The text looks not bold and the inspector shows: 文本看起来不是粗体,并且检查器显示:

在此处输入图片说明 :

Meaning user agent style was overridden with provided value. 意味着用户代理样式已被提供的值覆盖。

Is it what you are seeing? 是你看到的吗? If yes then everything works as expected. 如果是,则一切正常。 If not then maybe your style rules for strong elements are not correct so they are not executing? 如果不是,那么您针对strong元素的样式规则可能不正确,因此它们没有执行? Can you show your css? 可以显示CSS吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM