html2canvas icon indicating copy to clipboard operation
html2canvas copied to clipboard

Compatibility issues with CSS linear gradient attributes

Open blueflame-hfy opened this issue 1 year ago • 2 comments

Please make sure you are testing with the latest release of html2canvas. Old versions are not supported and issues reported for them will be closed.

Please follow the general troubleshooting steps first:

  • [ ] I'm using the version of "html2canvas": "^1.4.1",

Bug reports:

image

As shown in the picture, there will be a border on the far right after being converted into an image.

my css code: background: linear-gradient(90deg, rgba(182, 39, 141, 1) 29.13%, rgba(182, 39, 141, 0) 100%)

Specifications:

  • html2canvas version tested with: 1.4.1
  • Browser & version: Chrome 88.0.4324.190(正式版本) (64 位)
  • Operating system: Windows

blueflame-hfy avatar May 15 '23 02:05 blueflame-hfy

我也有这个疑问,后来用 mask-image 模拟这种渐变以缓解

qinhua avatar Sep 18 '23 07:09 qinhua

这个问题我也遇到了。 我设置了background的position和size解决了,size超出box的宽度,将原本最右侧的线条挤出去。 参考:jsfiddle

chan21252 avatar Feb 20 '24 07:02 chan21252