DOM:stylesheet.insertRule
z Mozilla Developer Center, polskiego centrum programistów Mozilli.
UWAGA: Tłumaczenie tej strony nie zostało zakończone.
Może być ona niekompletna lub wymagać korekty.
Chcesz pomóc? | Dokończ tłumaczenie | Sprawdź ortografię | Więcej takich stron...
Spis treści |
[edytuj] Podsumowanie
The insertRule method inserts a new style rule into the current style sheet.
[edytuj] Składnia
stylesheet.insertRule(rule, index)
[edytuj] Parametry
ruleis a string containing the rule to be inserted (selector and declaration).indexis a number representing the position to be inserted.
[edytuj] Przykład
// push a new rule onto the top of my stylesheet
myStyle.insertRule("#blanc { color: white }", 0);
[edytuj] Uwagi
For rule sets this contains both the selector and the style declaration. For at-rules, this specifies both the at-identifier and the rule content.