แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > FieldLabel > setClass
เมธอด FieldLabel.setClass()
กำหนดคลาส CSS ที่ใช้กับ textElement_ ของช่อง
ลายเซ็น:
setClass(cssClass: string | null): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
cssClass |
สตริง | ค่าว่าง |
ชื่อคลาส CSS ใหม่ หรือ Null ที่จะนำออก |
การคืนสินค้า:
เป็นโมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-09-12 UTC
[null,null,["อัปเดตล่าสุด 2024-09-12 UTC"],[[["The `FieldLabel.setClass()` method allows you to dynamically change the CSS class applied to the text element of a field label within Blockly."],["This method accepts a single parameter: `cssClass`, which can be a string representing the new CSS class name or null to remove any existing class."],["Calling `FieldLabel.setClass()` updates the visual appearance of the field label by applying or removing a specific CSS class."]]],[]]