Use a text-indent
and it will work. Example:
$(".test").animate({ textIndent: 100 }, {
step: function(now,fx) {
$(this).css('-webkit-transform',"translate3d(0px, " + now + "px, 0px)");
},
duration:'slow'
},'linear');
Also, you can remove scale(1)
from -webkit-transform
.
JSFIDDLE
To avoid changing of a useful property you can give any property there. See the example bellow:
$(".test").animate({ whyNotToUseANonExistingProperty: 100 }, {
step: function(now,fx) {
$(this).css('-webkit-transform',"translate3d(0px, " + now + "px, 0px)");
},
duration:'slow'
},'linear');
JSFIDDLE
And because I am a Firefox fan, please implement Firefox compatibility too adding this line, like here:
$(this).css('-moz-transform',"translate3d(0px, " + now + "px, 0px)");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…