Bản khảo sát nghiên cứu: Cho chúng tôi biết trải nghiệm của bạn khi sử dụng Blockly
Bắt đầu khảo sát
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
blockly > blockRendering > ConstantProvider > injectCSS_
Phương thức blockRendering.ConstantProvider.injectCSS_()
Chèn CSS dành riêng cho trình kết xuất vào trang.
Chữ ký:
protected injectCSS_(tagName: string, selector: string): void;
Thông số
Thông số |
Loại |
Mô tả |
tagName |
chuỗi |
Tên của thẻ kiểu sẽ sử dụng. |
bộ chọn |
chuỗi |
Bộ chọn CSS cần sử dụng. |
Trả về:
void
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2024-11-09 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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"]]