I am trying to achieve an animation akin to door/folder opening by applying rotateY to a div that contains texts and images. When applied, text elements become blurry:
blurry_chrome
All that is applied to the divs are this:
.folder:hover {
transform: translateZ(0) scale(1.12);
}
.folder:hover .front-cover {
transform: perspective(1000px) rotateY(-20.44deg);
}
The problem persists even when one or the other is stripped away. Text is still blurry when only scale or rotateY is applied.
On firefox, the issue seems to actually be far worse:
blurry_firefox
I have tried quite a few hacks like translateZ(0), blur(0) and font-smoothing and it hasn't changed anything.
Is there no way to work around this if I want this effect?
Codepen: https://codepen.io/mello-code/pen/XWpzxWd
Edit: Some of the 'solutions' I have already tried:
- -webkit-font-smoothing: subpixel-antialiased;
- filter: blur(0);
- transform-origin: 51% 51%;
- making div sizes, elements, paddings and margins even
- backface-visibility: hidden;
- perspective(1px) (There is already perspective applied on hover)
- zoom instead of scale
None of them seem to help. Any ideas?
transform: perspective(1000px) rotateY(-20.44deg);. You can try using a different degree, or not rotating it at all. You can also get less blurring if you scale it up to 1.5 instead of 1.2. Alternatively, you can scale it up by changing the width, height, font sizes instead of using scale. - JohnrotateYaltogether kinda defeats the purpose of trying to resolve the issue in the first place. I've tried different angles, but they seem to be all more or less the same. - Jin