[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ja/docs/Web/API/CSSImageValue [Back]  [Original]

CSSImageValue - Web API | MDN

MDN Web Docs

View in English Always switch to English

CSSImageValue

Want more browser support for this feature? Tell us why.

Experimental:

CSSImageValue CSS API background-image, list-style-image, border-image-source

CSSImageValue <image> URL url() image() linear-gradient() element()

CSSStyleValue CSSImageValue

CSSStyleValue

html
<button>Magic Wand</button>

CSS

css
button {
  display: inline-block;
  min-height: 100px;
  min-width: 100px;
  background: no-repeat 5% center url(magicwand.png) aqua;
}

background-image

js
// 
const button = document.querySelector("button");

// computedStyleMap()
const allComputedStyles = button.computedStyleMap();

// CSSImageValue 
console.log(allComputedStyles.get("background-image"));
console.log(allComputedStyles.get("background-image").toString());

CSS Typed OM Level 1
# imagevalue-objects


Web Proxy Viewer  |  New URL  |  Original Page