Web features explorer

element()

Limited availability

The element() CSS function creates a live-updating image from an HTML element that can be used as an image or background image.

Browser support (view on caniuse.com)

  • Chrome Not supported
  • Chrome Android Not supported
  • Edge Not supported
  • Firefox Not supported Bugs: 707106
  • Firefox for Android Not supported
  • Safari Not supported
  • Safari on iOS Not supported

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.

MDN documentation

Developer use cases

  • I maintain a plugin called "[Statusbar Organizer](https://github.com/Opisek/obsidian-statusbar-organizer)" for the webapp "Obsidian". It lets users rearrange specific HTML elements to their liking with a drag and drop approach in a settings window. For the user to be able to preview their changes and be able to tell how their actions affect the actual elements, I need to be able to display a "copy" of the elements that are being manipulated. Using `element` I could easily create live-updating previews of the manipulated elements. I maintain a plugin called "[Statusbar Organizer](https://github.com/Opisek/obsidian-statusbar-organizer)" for the webapp "Obsidian". It lets users rearrange specific HTML elements to their liking with a drag and drop approach in a settings window. For the user to be able to preview their changes and be able to tell how their actions affect the actual elements, I need to be able to display a "copy" of the elements that are being manipulated. Using `element` I could easily create live-updating previews of the manipulated elements. [see original comment]