【发布时间】:2020-09-03 23:46:18
【问题描述】:
在我的codepen 中,我在一个段落中放置了<strong></strong> 标签,但我注意到没有显示重点。 Chrome 开发者工具显示了强大的用户代理样式表通过它有一条线。由于我自己没有覆盖 strong 或更改代码中的任何字体粗细,有什么可能会禁用此设置?
我使用的是 chrome 版本 56。
<p id="p10">offset() - Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document. <strong>[returns: object]</strong>
</p>
【问题讨论】:
-
您正在使用 reset.css 文件。
-
谢谢,我想我在这里遗漏了一些东西。为什么包含:字体:继承的reset.css文件会覆盖字体粗细?不继承意味着从父级或我的案例中获取用户代理样式表吗?如果使用 reset.css 将始终覆盖 标签,reset.css 应该是将 重新定义回其原始意图的文件。
-
@Eggs
inherit表示使用与父元素相同的属性。你需要的是一个 normalize 样式表而不是 reset 样式表。