# 内容分隔符+居中文本语法+字体颜色

**URL:** https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327
**Category:** Support
**Created:** [2021年十二月28日 23:23 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327 "2021-12-28T23:23:24Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![needhelp](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@needhelp](https://meta.discourse.org/u/needhelp)
#### Post date: [2021年十二月28日 23:23 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327/1 "2021-12-28T23:23:24Z")

</div>

大家好：

请允许我问几个问题：

1. 是否有办法在帖子中创建内容分隔符，例如，即使只是一条线将帖子分成两部分？

2. 如果没有，那么是否有简单的方法可以使帖子中的文本居中？我想我只需键入------并使其在帖子中居中。

3. 另外，是否有办法更改帖子中的字体颜色？

谢谢

---

<div class="post-metadata">

### Author: ![JimPas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimpas/32/148179_2.png) [@JimPas](https://meta.discourse.org/u/JimPas)
#### Post date: [2021年十二月28日 23:37 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327/2 "2021-12-28T23:37:37Z")

</div>

您可以在要分隔的文本或图像下方单独使用 3 个 `*`（无空格）\n\*\*\*\n这会创建上面那样的分隔线。 🙂

---

<div class="post-metadata">

### Author: ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)
#### Post date: [2021年十二月28日 23:55 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327/3 "2021-12-28T23:55:34Z")

</div>

插件和主题组件解决了第 2 点和第 3 点，例如

- [MD Composer extras](https://meta.discourse.org/t/md-composer-extras/118912)
- [Discourse BBCode](https://meta.discourse.org/t/discourse-bbcode/65425)

---

<div class="post-metadata">

### Author: ![needhelp](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@needhelp](https://meta.discourse.org/u/needhelp)
#### Post date: [2021年十二月29日 00:29 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327/4 "2021-12-29T00:29:25Z")

</div>

@Benjamin_D @JimPas 谢谢你们，非常感谢。

---

<div class="post-metadata">

### Author: ![needhelp](https://avatars.discourse-cdn.com/v4/letter/n/fbc32d/32.png) [@needhelp](https://meta.discourse.org/u/needhelp)
#### Post date: [2021年十二月29日 00:33 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327/5 "2021-12-29T00:33:40Z")

</div>

出于好奇，我猜想有没有办法在不使用插件的情况下完成第 2 和第 3 项？

我正试图避免在论坛上安装过多的插件。

---

<div class="post-metadata">

### Author: ![Steven](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/steven/32/187890_2.png) [@Steven](https://meta.discourse.org/u/Steven)
#### Post date: [2021年十二月29日 02:00 UTC](https://meta.discourse.org/t/content-divider-center-text-syntax-font-color/213327/6 "2021-12-29T02:00:29Z")

</div>

div 对齐是白名单，您可以在没有插件或主题组件的情况下使用它。

```plaintext
<div align="center">

您的文本

</div>

```

我不认为颜色也一样。但您可以使用 wrap bbcode。您可以浏览此主题以收集一些有用的信息

> [@BBcode color tags in a theme](https://meta.discourse.org/t/bbcode-color-tags-in-a-theme/211902):
>
> Continuing the discussion from [Discourse BBCode color](https://meta.discourse.org/t/discourse-bbcode-color/65363) Can this be offered as a theme component? This would allow customers on managed instances to install it. I also feel like there should be a more intuitive way of selecting color for a text, such as a color picker.
