css:如何获取浏览器的默认字体系列 [英] css: how to get the browser's default font family
问题描述
我是使用 css 的新用户,也许这个问题很琐碎,但我已经google了一些,我找不到我要找的东西。
I'm new with css and maybe this question is trivial, but I have googled a little and I didn't find what I'm looking for.
我已经为我的所有网站声明了一个font-family。现在,我想覆盖某些部分的字体系列。我需要浏览器的默认字体系列。如何在css中指定浏览器的默认字体系列?
I have declared a font-family for all my site. Now, I want to override the font family for some sections. I need the browser's default font family. How can I specify the browser's default font family in a css?
.browser-defatults {
font-family: ?????
}
感谢先进。
EDIT :可能需要忽略所有样式,我该如何做?
EDIT: Maybe I need to ignore all styles, how could I do this?
推荐答案
从我知道的CSS不提供一个选项忽略所有以前的用户样式属性。
From what I know CSS doesn't offer an option to ignore all previous user styles for a property.
解决问题的方法可能是使用 generic font-family ,
A work-around to your problem may be to use a generic font-family,
font-family: serif;
并让浏览器选择
这篇关于css:如何获取浏览器的默认字体系列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!