safari 中图像质量低,使用了 jssor 滑块

2022-01-24 00:00:00 slider jquery javascript css jssor

我在我的网站上使用了 jssor 滑块,它在除 safari 之外的所有浏览器中都能正常工作,在 safari 中图像几乎没有模糊.我的图像尺寸大于滑块 Div,图像尺寸为 (1207 x 708) 但 div 为 900 x 600 像素.请帮助我如何解决此问题

解决方案

将此添加到您的滑块选项列表中:

<上一页>$HWA:假

HWA 是硬件加速,根据 JSSOR 参考 - link

我通过另一个 S.O. 发现了这个选项.JSSOR 发帖回应想要阻止-webkit-transform: perspective(2000);"的人被注入到他们的代码中,确实如此.因此,它可能会影响 3D 过渡(未经测试).

似乎设置 $HWA: false 也会禁用图像重采样,从而允许您的 Retina 兼容图像正确显示.

I have used jssor slider on my website which works fine in all browsers except safari, in safari images are little blur. My image size is bigger than slider Div, image size is (1207 x 708) but div is of 900 x 600 px. please help me how can i fix this issue

解决方案

Add this to your list of slider options:

$HWA: false

HWA is HardWare Acceleration, according to the JSSOR reference - link

I discovered this option via another S.O. post from JSSOR in response to someone who wanted to prevent "-webkit-transform: perspective(2000);" being injected into their code, which it does. It may, therefore, affect 3D transitions (untested).

It appears that setting $HWA: false also disables image resampling, thus allowing your Retina-compatible images to show correctly.

相关文章