> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aftersell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 更改字体大小

> 使用自定义 CSS 调整 Upcart 中的文本大小。

<div id="overview">
  # 概述
</div>

如果你想更改购物车中特定文本元素（例如 upsell 标题或款式选项）的字体大小，可以使用 Upcart 内置的**自定义 CSS** 编辑器来实现。

***

<div id="step-1-inspect-the-element">
  ## 步骤 1：检查元素
</div>

1. 打开你的店面并启动 Upcart 抽屉。
2. 右键点击你想更改字体大小的元素。
3. 在浏览器的右键菜单中选择 **Inspect**，打开开发者工具。
4. 在 HTML 面板中找到该元素的**类名**。\
   示例：`upcart-item-option`

<div id="step-2-access-the-custom-css-editor">
  ## 步骤 2：进入自定义 CSS 编辑器
</div>

1. 前往 **Shopify Admin > Apps > Upcart**
2. 打开 **Cart Editor**
3. 点击 **Settings**
4. 找到 **Custom CSS** 部分

<div id="step-3-write-your-custom-css">
  ## 步骤 3：编写你的自定义 CSS
</div>

在 CSS 输入框中：

1. 以英文句点（`.`）开头，后跟类名
2. 添加 `{ font-size: 14px !important; }`（或你想要的大小）

示例：

```
.upcart-item-option {  
 font-size: 14px !important;  
}
```

💡 **注意：**`.upcart-item-option` 是 V1 类名。在 V2 中，对应的行项目款式文本类名为 `.upcart-public-component-product-tile__variant`。完整的类名集合请参阅 [V2 CSS 选择器库](/zh/upcart/upcart_css_selector_library_v2)。

仅当更改后样式仍被覆盖时才使用 `!important`。

<div id="step-4-save-and-test">
  ## 步骤 4：保存并测试
</div>

1. 在 Cart Editor 中点击 **Save**
2. 刷新你的店面页面
3. 打开 cart drawer，确认字体大小已更新

如果文本没有变化，请仔细核对类名，或再次使用浏览器的 Inspect 工具确认你选中的是正确的元素。
