Last active
March 23, 2022 11:31
-
-
Save Firsh/d1e94a5711f782306b2699a2c8ab4cb8 to your computer and use it in GitHub Desktop.
Counter perspective bug of the 3D slider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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