CSS Styles API

css.remove()

Removes the passed inline CSS styles from the matched DOM elements.

  • Accepts arguments as strings and arrays of strings.
    You can pass inline CSS styles as individual arguments, as an array, or as a string separated by commas or spaces, using "kebab-case", "camelCase", or "snake_case" formats.
    Each value is seen as a new argument.
  • If no arguments are passed, it removes all inline CSS styles from the matched DOM elements.
Example:
$('div ?').css.remove();
// Removes all inline CSS styles from all <div> elements.

$('div ?').css.remove('margin-left');
// Removes the inline CSS style 'margin-left' from all <div> elements.

$('div ?').css.remove('marginLeft', 'background_color');
// Removes the inline CSS styles 'margin-left' and 'background-color' from all <div> elements.

$('body').css.remove('margin', 'background-color');
// Removes the inline CSS styles 'margin' and 'background-color' from the <body> element.

$('body').css.remove(['marginLeft', 'background_color']);
$('body').css.remove('margin-left, backgroundColor');
$('body').css.remove('margin_left background-color');
// Removes the inline CSS styles 'margin-left' and 'background-color' from the <body> element.