Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > blockRendering > ConstantProvider > injectCSS_
Metoda blockRendering.ConstantProvider.injectCSS_()
Wstaw na stronie kod CSS odpowiedni dla mechanizmu renderowania.
Podpis:
protected injectCSS_(tagName: string, selector: string): void;
Parametry
Parametr |
Typ |
Opis |
tagName |
ciąg znaków |
Nazwa tagu stylu do użycia. |
selektor |
ciąg znaków |
Selektor arkusza CSS, którego chcesz użyć. |
Zwroty:
nieważne
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2024-11-09 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 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"]]