# 自定义链接文本格式的最佳方法？

**URL:** <https://meta.discourse.org/t/best-way-to-customise-the-formatting-of-the-link-text/277619>\
**Category:** Development\
**Tags:** custom-header-links\
**Created:** [2019 年5 月 1 日 14:31 UTC](https://meta.discourse.org/t/best-way-to-customise-the-formatting-of-the-link-text/277619 "2019-05-01T14:31:39Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![alexs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexs/32/139956_2.png) [@alexs](https://meta.discourse.org/u/alexs)\
发布日期： [2019 年5 月 1 日 14:31 UTC](https://meta.discourse.org/t/best-way-to-customise-the-formatting-of-the-link-text/277619/1 "2019-05-01T14:31:39Z")

</div>

自定义链接文本格式的最佳方法是什么？看起来编辑 CSS 并不是最佳方案，因为插件更新后更改将会丢失。

 ![40](https://global.discourse-cdn.com/meta/original/3X/3/1/3192a4564b5f9b762857c77f3fafd610021ec941.png)

我希望将其设为粗体，并将文本颜色更改为与网站主题相匹配，这样有助于更好地融入整体设计。

目前链接显示如下：

 ![03](https://global.discourse-cdn.com/meta/original/3X/9/9/99bd633cbbfd64c8b397cd9296a9ee5b6953b2d8.png)

而我希望它看起来像这样：

 ![39](https://global.discourse-cdn.com/meta/original/3X/2/d/2dc2c72b31e2051f21db0ccde9ddc91e1204fccd.png)

如果还能根据主题自定义文本样式那就更好了。我有一套深色主题和一套浅色主题，每种主题都配有不同的字体颜色。我希望能够将文本颜色设置为与当前主题相匹配。

---

_[View the full topic](https://meta.discourse.org/t/best-way-to-customise-the-formatting-of-the-link-text/277619)._
