Note that there are some explanatory texts on larger screens.

plurals
  1. POdoes translate3d perform better with css3 animations?
    text
    copied!<p>I have been searching and spending lot's of hours on the web to get smooth animations. </p> <p>Is it correct that when you set a element properties like below using the translate3d propertie that it will automatically trigger hardware cpu acceleration?</p> <pre><code>.someclass { /*does it trigger hardware cpu acceleration*/ transform: translate3d(0,0,0); -webkit-transform: translate3d(0,0,0); -moz-transform: translate3d(0,0,0); -ms-transform: translate3d(0,0,0); -o-transform: translate3d(0,0,0); } </code></pre> <p>And do you have to animate it's 3d property after settings this? or can you animate any css property.</p> <p>To animate this i have another class</p> <pre><code>.connectanimation { -moz-transition: all .7s ease; -moz-transition: all .7s ease; -ie-transition: all .7s ease; -o-transition: all .7s ease; transition: all .7s ease; } </code></pre> <p>Then I use jQuery to animate the div element.</p> <pre><code>jQuery('#somedivid').on('mouseover', function() { jQuery(this).removeClass('connectanimation').addClass('connectanimation'); jQuery(this).css("margin-top","100px"); // a normal css transition //jQuery(this).css('MozTransform', 'translate3d(0px, 100px, 0px)'); // or this way? }); </code></pre> <p>Am I doint it the right way here? And what should I use to animate for best performance? If it was the translate3d way.. then I would get a lot of lines extra in my code for support for other browser like opera, chrome etc right?</p> <p>Regards,</p> <p>Chris.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload