wkhtmltoimage CSS3 gradient rendering in Snapshots

梦想的初衷 提交于 2019-11-30 22:36:36
Interlated

Did you check your gradient syntax. wkhtmltopdf uses the webkit syntax.

  background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,rgb(64,128,176)),color-stop(100%,rgb(1,73,129)));
  background:linear-gradient(to bottom,rgb(64,128,176) 0%,rgb(1,73,129) 100%);

The second syntax will not count to wkhtmltopdf but the first one works for the version of wkhtmltopdf I have (0.10.0 rc2).

I also found that modern webkit syntax doesn't work. i.e. this didn't work

background: -webkit-linear-gradient(top, #ccc 0%, #888 100%);

As per this : stackoverflow entry

As as 0.12.2.1 of wkhtmltopdf the gradient css - either old or new doesn't work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!