# 將類別作為自訂屬性新增至元素

Webflow 的最新更新透過允許在元素設定中使用類別來增強自訂屬性功能。這為樣式元件增加了新的機會並簡化了樣式，從而可以透過元件屬性或 CMS 欄位進行類別分配。

現在，文字可以輸入到元素的類別屬性中，從而擴大了樣式的可能性。這包括將自訂程式碼類別或 Webflow 定義的類別新增至類別屬性。

您可以簡單地使用術語“類別”，而不是保留訊息。這使得設定與自訂元素內聯。

<figure><img src="https://cdn.prod.website-files.com/64f9399ca7d13575ff21a675/6617f6ab6b763a9601b92dea_Class%20attribute.png" alt=""><figcaption><p>找到自訂屬性部分以新增類</p></figcaption></figure>

此更新提供了更大的樣式靈活性，這對於保持網站設計的一致性和遵守最佳實踐至關重要。透過開放類別屬性的使用，Webflow 提高了設計工作流程效率，創造了更直接、使用者友善的樣式設計路徑。

查看 Webflow University 上的文檔，以了解更多資訊並查看樣式組件的改進，以及它為網頁設計者和開發人員提供的創作自由度和效率。

***

April 11, 2024


---

# 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.tenten.co/docs-webflow/webflow-101/changelog/2024/jiang-lei-bie-zuo-wei-zi-ding-shu-xing-xin-zeng-zhi-yuan-su.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.
