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

后端 未结 3 683
情深已故
情深已故 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:00

    Yes it is possible to save a HTML element as image (PNG file). See

    • Capture HTML Canvas as gif/jpg/png/pdf?
    • how to save canvas as png image?
    • HTML5 Save canvas to PNG
    • Drawing PNG to a canvas element -- not showing transparency
    • http://asserttrue.blogspot.de/2011/12/in-yesterdays-post-i-showed-how-to.html

提交回复
热议问题