# 如何更改全局字体大小？

**URL:** <https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756>\
**Category:** Support\
**Created:** [2023年五月3日 23:28 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756 "2023-05-03T23:28:06Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月3日 23:28 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/1 "2023-05-03T23:28:06Z")

</div>

您好，  
似乎没有简单的方法可以更改论坛的全局字体大小。Discourse 团队能否推出一项新功能来更改全局字体大小？  
全局字体大小现在太小了。  
祝您有美好的一天，  
Frank

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月3日 23:59 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/2 "2023-05-03T23:59:55Z")

</div>

作为用户，您可以在“个人资料 - 偏好设置 - 界面”中更改默认字体大小设置：

 ![IMG_3253](https://global.discourse-cdn.com/meta/original/4X/7/c/1/7c105f6c85c3a8096b91c7dfd80fbddbea85932a.jpeg)

---

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月4日 00:16 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/3 "2023-05-04T00:16:25Z")

</div>

但是，我计划建立一个拥有数千名 50 岁以上老年人的社区。不可能教会每个人都将界面偏好设置为最大的字体大小。

如果有一种简单的方法可以将整个论坛设置为最大的字体大小，那会好得多。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月4日 00:27 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/4 "2023-05-04T00:27:31Z")

</div>

试试这个：

在公共 CSS 中：

```scss
body {
    font-size: 20px;
}

```

您可以将 20px 设置为您认为合适的任何大小。我认为这里的默认值大约是 15px。我通过这种方式精细地控制了我们网站在所有主题中的基础字体大小。

---

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月4日 00:30 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/5 "2023-05-04T00:30:35Z")

</div>

莉莉，您好：

CSS 放在哪里？

谢谢，  
弗兰克

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月4日 00:33 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/6 "2023-05-04T00:33:37Z")

</div>

settings-customize-themes

然后，在你想要更改默认字体的任何主题中，都需要编辑 CSS 并将该代码放入通用 CSS 部分。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月4日 00:37 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/7 "2023-05-04T00:37:26Z")

</div>

如果您从未做过此类事情，我建议您熟悉主题的基本知识。🙂

> [@Beginner's guide to using Discourse Themes](https://meta.discourse.org/t/beginners-guide-to-using-discourse-themes/91966):
>
> This is a crash course in Discourse theme basics. The target audience is everyone who is not familiar with Discourse themes. If you’ve already used Discourse theme / theme components, this guide is probably not something you need to read. What are themes and theme components? A theme or theme component is a set of files packaged together designed to either modify Discourse visually or to add new features. Let’s start with themes. Themes In general, themes are not supposed to be compatible …

---

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月4日 00:28 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/9 "2023-05-04T00:28:09Z")

</div>

您好，  
如果我想更改整个论坛的全局字体大小，可以将 CSS 放在哪里？  
谢谢，  
Frank

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月4日 00:42 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/10 "2023-05-04T00:42:09Z")

</div>

@Frankz 我已经回答了你关于这个问题的另一个话题

> [@如何更改全局字体大小？](https://meta.discourse.org/t/do-you-want-an-easy-way-to-change-the-global-font-size/263756/6?u=lillinator):
>
> settings-customize-themes 然后，在你想要更改默认字体的任何主题中，都需要编辑 CSS 并将该代码放入通用 CSS 部分。

---

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月4日 01:08 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/11 "2023-05-04T01:08:55Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/0/8/6/08692d5ce26fc1763ea64d54d8a5c6712f6e98e1.png)

上面图片中，在“Colors”前面有一个“Themes”图标，但我的网页上没有“Themes”图标。我使用的是每月 25 美元的免费试用套餐。

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月4日 01:22 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/12 "2023-05-04T01:22:24Z")

</div>

请阅读我关于在您另一篇帖子中使用主题的回复

它在这里：

 ![IMG_3254](https://global.discourse-cdn.com/meta/original/4X/f/8/6/f86373d8cfa5cc5fb0683b1be13b39588772a88c.jpeg)

---

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月4日 01:36 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/13 "2023-05-04T01:36:19Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/4X/e/a/5/ea57cb568939ea48b09dba75ddb88634b849538f.jpeg)

嗨 Lilly，  
上面是我的网页，在“颜色”图标前面没有“主题”图标。  
Frank

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2023年五月4日 03:47 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/14 "2023-05-04T03:47:09Z")

</div>

看起来您可能使用的是 Basic 套餐？如果是这样，恐怕无法进行主题自定义，您需要升级到 Standard 套餐或更高版本才能使用此功能。

* * *

我已经将您在 [Change font sizes in your themes](https://meta.discourse.org/t/change-font-sizes-in-your-themes/120927) 上的帖子移至此处，以便将讨论集中在一起。 🙂

您似乎也 [之前](https://meta.discourse.org/t/how-to-change-the-global-font-size/255890/1) 问过/请求过这个问题。要默认更改所有人的字体大小，您可以使用 `default text size` 管理员设置，其额外的好处是无需访问主题自定义。 👍

> [@Frankz](#):
>
> Hi,  
> How to change the global font size?  
> Thank you,  
> Frank

> [@chapoi](#):
>
> You can however, choose a predefined size in the admin settings (Admin \> settings \> user preference \> default text size(near the bottom):
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/a/f/1/af154759ce16ef7d96af14ed9703dbfd8814c051.png)

---

<div class="post-metadata">

**Author:** ![Frankz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/frankz/32/491670_2.png) [@Frankz](https://meta.discourse.org/u/Frankz)\
**Post date:** [2023年五月4日 04:09 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/15 "2023-05-04T04:09:36Z")

</div>

> [@chapoi](#):
>
> 不过，您可以在管理员设置中选择预设的大小（管理员 \> 设置 \> 用户偏好 \> 默认文本大小（靠近底部）：
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/a/f/1/af154759ce16ef7d96af14ed9703dbfd8814c051.png)

您上面的回复是一个完美的解决方案！

祝您晚安，

Frank

---

<div class="post-metadata">

**Author:** ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)\
**Post date:** [2023年五月4日 04:18 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/16 "2023-05-04T04:18:21Z")

</div>

太好了。 🙂 由于此功能已存在，我已将其更改为 #Support 主题。 👍

---

<div class="post-metadata">

**Author:** ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)\
**Post date:** [2023年五月4日 07:04 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/17 "2023-05-04T07:04:04Z")

</div>

哼，我以为这个设置在哪里存在，找了一下，但没找到，因为我搜的是字体而不是文本 🤦‍♀️

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [2023年六月3日 07:05 UTC](https://meta.discourse.org/t/how-can-i-change-the-global-font-size/263756/18 "2023-06-03T07:05:01Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
