# 样式

<mark style="color:默认;background-color:yellow;">样式可以快速将文本的部分内容替换为其他东西</mark>，例如要创建效果组合、打字机动作和事件的组合，否则这些重复标签会让你大量输入。

{% hint style="danger" %}
如果你使用的是 TMPro，请为此使用 Text Animator 样式而不是 TMPro 的样式，因为后者（TMPro 的）无法识别 Text Animator 标签，且会导致这些标签被加入到文本中。
{% endhint %}

***

只需打开你选择的样式表脚本化对象（你可以在项目文件夹通过“创建”菜单 -> Text Animator -> StyleSheet 创建一个），然后开始添加/编辑标签。

{% hint style="info" %}
你可以有一个全局样式表（ [全局设置](/text-animator-unity/3.x-zh/zi-ding-yi/quan-ju-she-zhi.md) ）也可以有一个本地样式表。
{% endhint %}

![](/files/0b9a659f12632c80fe8df54b04d0ffbedf1fb1fc)

从上面的示例来看，每当你在文本中写入样式标签“`<style1>`”时，它将被替换为“`<wave><play=5><rainb><shake>`”——并且用“`</style1>`”来关闭时，它将被替换为“`</wave></rainb></shake><?ended>`”。

{% hint style="info" %}
样式标签不区分大小写（写“\<style1>”和“\<Style1>”会产生相同的结果）。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.febucci.com/text-animator-unity/3.x-zh/zi-ding-yi/yang-shi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
