Generate image from DOM elements

前端 未结 3 552
没有蜡笔的小新
没有蜡笔的小新 2021-01-05 06:44

Is it possible to generate an image from dom elements (span, div, image, etc.)? I can\'t use canvas in this case, and it doesn\'t have to be cross-browser compatible, as lon

3条回答
  •  自闭症患者
    2021-01-05 07:21

    If you want to duplicate it to some other location, you can use -moz-element, an experimental non-standard feature in Firefox which will let you take any piece of the DOM, and use it as for example a background image. https://developer.mozilla.org/en/CSS/-moz-element

    Similar hacks can be done in webkit by abusing -webkit-box-reflect.

提交回复
热议问题