Correct CSS transitions for pagination