| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/deleteRule | [Back] [Original] |
Get to know MDN better
This feature is well established and works across many devices and browser versions. Its been available across browsers since July 2015.
The CSSStyleSheet method
deleteRule() removes a rule from the stylesheet
object.
deleteRule(index)
indexThe index into the stylesheet's CSSRuleList indicating the rule to be
removed.
None (undefined).
This example removes the first rule from the stylesheet myStyles.
myStyles.deleteRule(0);
| Specification |
|---|
| CSS Object Model (CSSOM) # dom-cssstylesheet-deleterule |
This page was last modified on Oct 25, 2023 by MDN contributors.
CSSStyleSheetCSSCSSConditionRuleCSSFontFeatureValuesMapCSSFontFeatureValuesRuleCSSFontPaletteValuesRuleCSSFunctionDeclarationsCSSFunctionDescriptorsCSSFunctionRuleCSSGroupingRuleCSSImportRuleCSSKeyframeRuleCSSKeyframesRuleCSSLayerBlockRuleCSSLayerStatementRuleCSSMediaRuleCSSNamespaceRuleCSSPageDescriptorsCSSPageRuleCSSPropertyRuleCSSRuleCSSRuleListCSSStartingStyleRuleCSSStyleDeclarationCSSStylePropertiesCSSStyleRuleCSSSupportsRuleCaretPositionMediaListMediaQueryListScreenStyleSheetStyleSheetListYour blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |