为提升您的使用体验,本站正在维护,部分功能暂时无法使用。如果本站文章无法解决您的问题,您想要向社区提问的话,请到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 提问,我们的支持社区将会很快回复您的疑问。

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

limit excessive font size differences on a page

  • 5 个回答
  • 3 人有此问题
  • 1 次查看
  • 最后回复者为 pie3re-sync

more options

(automatic translation) Hello, I have been looking for a long time for the solution to something that bothers me during my navigation: the sometimes too large differences in font size between the different parts of a page, for example between a title in large font size and the item of normal or small size. If it's possible in the original Firefox settings, I can't. I haven't found any extension that does this either. Anyone know?

Bonjour, je cherche depuis longtemps la solution à une chose qui me dérange lors de ma navigation : les parfois trop grands écarts de taille de police entre les différentes parties d'une page, entre par exemple un titre en police de grande taille et l'article d'une taille normale voire petite. Si c'est possible dans les réglages d'origine de Firefox je n'y arrive pas. Je n'ai pas trouvé d'extension non plus qui fasse ça. Quelqu'un sait-il ?

(automatic translation) Hello, I have been looking for a long time for the solution to something that bothers me during my navigation: the sometimes too large differences in font size between the different parts of a page, for example between a title in large font size and the item of normal or small size. If it's possible in the original Firefox settings, I can't. I haven't found any extension that does this either. Anyone know? Bonjour, je cherche depuis longtemps la solution à une chose qui me dérange lors de ma navigation : les parfois trop grands écarts de taille de police entre les différentes parties d'une page, entre par exemple un titre en police de grande taille et l'article d'une taille normale voire petite. Si c'est possible dans les réglages d'origine de Firefox je n'y arrive pas. Je n'ai pas trouvé d'extension non plus qui fasse ça. Quelqu'un sait-il ?

所有回复 (5)

more options

Bonjour,

Can you post some links to pages where the difference is very large ?

If this is on pages you visit regularly then this is possible via CSS rules in userContent.css. You can possibly set a fixed font-size to override all font-size specified by websites, but affects all cases. If this is only about Heading Elements (H1 - H6 tags) then this is easier to fix.

more options

Hi I was visiting this site when one more time I thought to myself that I'd like to solve this problem Thanks for your answer I'm going to look at these links

more options

Hi I was visiting this site when one more time I thought to myself that I'd like to solve this problem Thanks for your answer I'm going to look at these links

more options

That is an H1 tags that has a CSS rule that sets the font-size to 3.8rem (38px in my case) when the screen is very wide. Further down there are H2 tags. You get these large font-sizes when the screen is wider than 61.25em. It looks better with a screen width below about 950px.

So in this case you can reduce the screen width to avoid getting these large font-sizes, see screenshot 3.

A possible CSS rule for userContent.css would be for this website. The last screenshot shows the result of using this rule in userContent.css.

@-moz-document domain(www.ouest-france.fr){
.su-article * {font-size: 2rem !important;}
}

It is not that difficult to create userContent.css if you have never used it.

The first step is to open the "Help -> Troubleshooting Information" page and find the button to access the profile folder.

You can find this button under the "Application Basics" section as "Profile Folder -> Open Folder". If you click this button then you open the profile folder in the Windows File Explorer. You need to create a folder with the name chrome in this folder (name is all lowercase). In the chrome folder you need to create a plain text file with the name userContent.css (name is case sensitive). In this userContent.css text file you paste the text posted above.

In Windows saving the file is usually the only time things get more complicated because Windows can silently add a .txt file extension and you end up with a file named userContent.css.txt. To avoid this you need to make sure to select "All files" in the dialog to save the file in the text editor using "Save File as".

You need to close (Quit/Exit) and restart Firefox when you create or modify the userContent.css file.

See also:

In Firefox 69 and later you need to set this pref to true on the about:config page to enable userChrome.css and userContent.css in the chrome folder.

  • toolkit.legacyUserProfileCustomizations.stylesheets = true

See:

由cor-el于修改

more options

Thank you for taking this time to provide me with this answer! I think I understood the principle, even if I'm not sure I have the motivation to do this for each site that seems to me to have this problem! Merci