How to get png image of a CSS styled element using canvas with transparent background?

后端 未结 3 695
情深已故
情深已故 2021-01-02 17:38

I want to use CSS to style an element on a webpage and then to use that element as a static png. Is it possible to draw html node on eg. canvas and save such image with tran

3条回答
  •  抹茶落季
    2021-01-02 18:11

    Just found an easy way via Safari.

    Right click on element, Inspect Element, then in the Inspector right click on the element node you want to export and pick Capture Screenshot. This to me resolves transparency. Safari Version 13.1 (14609.1.20.111.8)

提交回复
热议问题