# 如何使用 CSS 更改类别缩写

**URL:** <https://meta.discourse.org/t/how-to-change-the-category-abbreviation-using-css/376207>\
**Category:** Development\
**Created:** [2025年七月28日 15:19 UTC](https://meta.discourse.org/t/how-to-change-the-category-abbreviation-using-css/376207 "2025-07-28T15:19:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mich-Seth\_Owusu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mich-seth_owusu/32/491212_2.png) [@Mich-Seth\_Owusu](https://meta.discourse.org/u/Mich-Seth_Owusu)\
**Post date:** [2025年七月28日 15:19 UTC](https://meta.discourse.org/t/how-to-change-the-category-abbreviation-using-css/376207/1 "2025-07-28T15:19:22Z")

</div>

如果其他人需要使用 CSS 更改类别缩写，您可以通过定位框和缩写，并使用以下 CSS 代码替换为您自己的缩写。我花了一段时间才弄明白，所以不想藏着掖着。

```plaintext
.category-box.category-box-CATEGORYSLUGHERE .category-box-inner .category-logo.no-logo-present .category-abbreviation {
  visibility: hidden;
  position: relative;
}

.category-box.category-box-CATEGORYSLUGHERE .category-box-inner .category-logo.no-logo-present .category-abbreviation::after {
  content: "NEWABBREVIATIONHERE";
  visibility: visible;
  position: absolute;
  top: 0;
  left: 0;
}

```
