Why does enabling hardware-acceleration in CSS3 slow down performance?

I always add : -webkit-backface-visibility: hidden; -webkit-perspective: 1000; When working with 3d transform. Even “fake” 3D transforms. Experience tells me that these two lines always improve performances, especially on iPad but also on Chrome. I did test on your exemple and, as far as I can tell, it works. As for the “why” part of … Read more

Drawing border colors during a CSS transition

I would use multiple linear-gradient and a complex animation (by animating size/position of each one) to obtain the final result. If you get the trick you can easily adjust the different values to obtain any animation you want. .draw { padding: 20px 50px; outline:none; border: none; box-shadow: none; background-image: linear-gradient(#f45e61, #f45e61), linear-gradient(#f45e61, #f45e61), linear-gradient(#f45e61, #f45e61), … Read more

webkit transform blocking link

After combing through the webkit Bugzilla, I found someone who had the same issue and found a workaround. .face.back { background-color: #125672; -moz-transform: rotateY(180deg); -webkit-transform: rotateY(180deg); } Becomes: .face.back { background-color: #125672; -moz-transform: rotateY(180deg); -webkit-transform: rotateY(180deg) translateZ(1px); } The addition of the translateZ to the transform makes the left side of the element clickable. Here … Read more

CSS3 transitions on pseudo-elements (:after, :before) not working?

WebKit (Chrome, Safari) does not support transitions on pseudo elements. https://bugs.webkit.org/show_bug.cgi?id=23209 http://code.google.com/p/chromium/issues/detail?id=54699 It should work in Firefox. Edit: The issue in WebKit is now resolved. The patch allready landed in Chrome Carnery, so it will be supportet from version 26 on. I don’t know about Safari.

CSS Transition Not Firing

A cleaner approach that does not rely on setTimeout, is to read the css property in question before setting it: var div = $(‘<div />’).addClass(‘trans’); $(‘#container’).append(div); div.css(‘width’);//add this line div.css(‘width’, ‘200px’); Working here: var div = $(‘<div class=”trans” />’); $(‘#container’).append(div); var div = $(‘<div />’).addClass(‘trans’); $(‘#container’).append(div); div.css(‘width’);//add this line div.css(‘width’, ‘200px’); .trans { width: 20px; … Read more