function
Element() — CSS reference
Proposed image value referencing the rendered appearance of an element by ID. Gecko historically uses -moz-element(); avoid assuming that the unprefixed form works. The gradient fallback has no live link to the source element.
Formal Syntax & Structure
css syntaxcss
element(#source)Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>element()</title><style>body{margin:0;background:white}#a{box-sizing:border-box}#a{width:80px;height:40px;background-image:linear-gradient(red,blue);background-image:element(#source)}</style><body><div id="source">Source</div><div id="a" aria-label="Decorative background"></div></body></html>