开发者

How to get the browser's default font family in CSS?

开发者 https://www.devze.com 2023-01-31 14:21 出处:网络
I\'m new to CSS and maybe this question is trivial, but I have googled a little and I didn\'t find what I\'m looking for.

I'm new to CSS and maybe this question is trivial, but I have googled a little and I didn't find what I'm looking for.

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?

.browse开发者_如何学Pythonr-defatults {
   font-family: ?????
}

Maybe I need to ignore all styles, how could I do this?


From what I know CSS doesn't offer an option to ignore all previous user styles for a property.

A work-around to your problem may be to use a generic font-family,

font-family: serif;

and let the browser choose.

0

精彩评论

暂无评论...
验证码 换一张
取 消