แบบสำรวจการวิจัย: บอกให้เราทราบเกี่ยวกับประสบการณ์การใช้งาน Blockly
เริ่มแบบสำรวจ
blockly > blockRendering > ConstantProvider > injectCSS_
เมธอด blockRendering.ConstantProvider.injectCSS_()
แทรก CSS เฉพาะสำหรับโหมดแสดงภาพลงในหน้าเว็บ
ลายเซ็น:
protected injectCSS_(tagName: string, selector: string): void;
พารามิเตอร์
พารามิเตอร์ |
ประเภท |
คำอธิบาย |
tagName |
สตริง |
ชื่อของแท็กรูปแบบที่จะใช้ |
Selector |
สตริง |
ตัวเลือก CSS ที่จะใช้ |
การคืนสินค้า:
โมฆะ
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-11-09 UTC
[null,null,["อัปเดตล่าสุด 2024-11-09 UTC"],[[["The `blockRendering.ConstantProvider.injectCSS_()` method injects renderer-specific CSS into the page for styling purposes."],["This protected method takes two string parameters: `tagName` for the style tag's name and `selector` for the CSS selector to target elements."],["Calling `injectCSS_()` adds styling rules, enabling customization of block rendering within the Blockly environment, ultimately affecting visual presentation."]]],["The `injectCSS_` method, part of the `blockRendering.ConstantProvider` class, adds renderer-specific CSS to the page. It takes two string parameters: `tagName`, which specifies the style tag's name, and `selector`, which defines the CSS selector. This protected method modifies the page's style by adding new style rules. It does not return any data.\n"]]