I'm really struggling trying to create smooth CSS transitions in Safari. I'm trying to hide/show divs by changing their height with a JavaScript onclick
event. The resulting transitions are nice and smooth with Chrome, Firefox, and Edge. However with Safari it just looks bad and must be around 15 fps when rendering.
A basic JSFiddle is here: https://jsfiddle.net/q5a9b62s/6/
The website I'm working on is here: http://www.allinimages.ch/
Thanks.
You could try using JavaScript to add a
className
to youdiv
like this:I've added the nullification of the
className
to enable toggling of the animation.Then, let CSS processing do all of the transforming for you:
Codepen example is here.
Great article on smooth CSS transitions is here.
Some issues for cross-browser use of
translate3d
are documented here.