1

I've got a div set up with a CSS .scroller class:

.scroller {
    position: relative;
    perspective: 150;
    -webkit-perspective: 150;
}

It contains divs that have their translateZ properties set by jQuery, simulating depth. That all works fine.

What I'd like to do now is animate the Z property from one value to another, but I can't seem to find the right syntax. I keep getting a 'Unexpected Identifier' error in the console. Amongst various combinations of speech marks and apostrophes, here is what I've tried:

$('#artist' + scrollerCounter).animate({-webkit-transform: translateZ(-40px), transform: translateZ(-40px)}, 1000);

Is it even possible to .animate the translateZ property?

4

0 回答 0