dom-to-image
dom-to-image copied to clipboard
Gradient color not properly exported
First I want to say thank you for making this library, it's quite useful. :) I've experience a strange result while trying to export an element colored in gradient(two colors). The image that I've exported is not the same as the one I have on my page. The exported one, looks like a single color, and not two color gradient. I'm using FileSaver lib for image exporting btw.
Element on my website:
Exported Image:
@stevdza-san 我按照下面的方式可以正确导出渐变色,你可以试下,希望对你有用
渐变色的样式写在内层元素gradientContent身上,即不要直接写在ID元素上
Hi @wsl0520, that did not work for me. Created an inner element with the gradient styles and still the exported image is in a solid color. Do you have any other ideas on how to fix this?