When a CSS animation is triggered and an object is positioned with CSS to be anything other than static
(relative
, absolute
, etc) the text inside the object suddenly goes very thin for the duration of the animation. It then reverts back to full width afterwards.
Try running this page in Safari: http://pastehtml.com/view/bjgaloxjj.html (updated for clarification)
Note that the problem disappears when the #content
div is not positioned absolutely or relatively. This is for an iPad web app, and is more pronounced on the device than on a desktop.
Any ideas as to what's causing this interference?
Edit for clarification: webkit-transform
and webkit-transition
must be used due to them being hardware accelerated, and this results in smoother animation.
I was able to reproduce your problem and this fixes it. You don't need a
transform
to achieve the result you're looking for, only atransition
.transition
by itself is hardware accelerated.From http://www.html5rocks.com/en/tutorials/speed/html5/#toc-hardware-accell:
Demo: http://jsfiddle.net/ThinkingStiff/bqSJX/
Script:
CSS:
HTML: