Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. StylePropertyMap
  4. delete()

StylePropertyMap: delete() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Thedelete() method of theStylePropertyMap interface removes the CSS declaration with the givenproperty.

Syntax

js
delete(property)

Parameters

property

An identifier indicating the stylistic feature (e.g., font, width, backgroundcolor) to remove.

Return value

None (undefined).

Examples

The following example removes thebackground-image property from theelement'sstyle attribute.

js
// get the button elementconst buttonEl = document.querySelector("button");// remove background-image from style attributebuttonEl.attributeStyleMap.delete("background-image");

Specifications

Specification
CSS Typed OM Level 1
# dom-stylepropertymap-delete

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp