Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

-webkit-transition-property for translation

Hai.
What is the transition property for translations in CSS3? I'm currently using all but I got a bug in iOS so I want to test another property.

-webkit-transform: translate(-320px, 0);

 

-webkit-transition: ??? .5 ease-in-out;

See the bug with an iOS device here (swipe horizontally), there's a kind of flash.


Update: to anyone interested, I found a way to fix it thanks to Duopixel:

E {
    -webkit-transition: all .5s ease-in-out;
    -webkit-transform: translate3d(0, 0, 0); // perform an "invisible" translation
}

// Then you can translate with translate3d(), no bug!
document.querySelector('E').webkitTransform = 'translate3d(-320px, 0, 0)'
like image 1000
seriousdev Avatar asked Dec 31 '10 12:12

seriousdev


People also ask

What are 5 translation procedures?

Based on the findings, the writer found that the translator used seven procedures: naturalization, componential analysis, addition, transference, cultural equivalent, couplets, and transposition.

What is a quote for translation?

A translation quote is an official document on the overview of how much it will cost you to get an accurate translation of your texts or original document into another language. Translation quotes usually include all translation services, such as grammar and spelling checks as well as proofreading.


2 Answers

Your solution will work, however it the exact answer you were looking for is -webkit-transform.

-webkit-transition: -webkit-transform .5s ease-in-out;
like image 126
Patrick Avatar answered Oct 06 '22 00:10

Patrick


There are tons of things you can transition, the easiest to test in my experience is opacity.

However, I've encountered the flashing problem before, try:

-webkit-transform: translate3d(-320px, 0, 0);

This will kick in hardware acceleration, which fixes the problem and makes the animation extremely smooth.

like image 37
methodofaction Avatar answered Oct 05 '22 23:10

methodofaction