Skip to content

Instantly share code, notes, and snippets.

@Firsh
Last active March 23, 2022 11:31
Show Gist options
  • Save Firsh/d1e94a5711f782306b2699a2c8ab4cb8 to your computer and use it in GitHub Desktop.
Save Firsh/d1e94a5711f782306b2699a2c8ab4cb8 to your computer and use it in GitHub Desktop.
Counter perspective bug of the 3D slider
(function() {
if (!window.devicePixelRatio || window.devicePixelRatio == 1) {
return;
}
if (typeof InstallTrigger == 'undefined') {
return;
}
var s = document.createElement('style');
var persp = Math.min(3072, 4096/(window.devicePixelRatio+0.1));
s.textContent = `
#fwdu3dcarDiv0 .fwdu3dcar div[style*="perspective"]{
perspective: ${persp}px !important;
}
`;
document.querySelector('head').append(s);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment