javascript - Safari text jumps/flicker when changing margin-top -
i have code:
if (curtop > top ) { $text.css("margin-top", math.abs( rect.top ) + cury + "px"); } else { $text.css("margin-top", cury - math.abs( rect.top ) + "px"); } where rect is:
rect = $text.get( 0 ).getboundingclientrect(); and cury:
var cury = parseint( $text.css( "margin-top" ) ); i believe there nothing wrong that... because works
in chrome , firefox... i'm noobish @ safari , not see why flickering...
in advance thank you!.
this solver animated it, might work others, it's perfect me:
if ( issafari ) { $text.css({ "-webkit-transition": "1s ease-in-out" }); }
Comments
Post a Comment