Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Martin Guzman
11,573 PointsJavaScript vs CSS
Hi Community,
I have a question of what is the prefer solution to create transitions. I have noticed image galleries effects can be achieved similarly with JavaScript and CSS. But is there some sort of technology preference for this? My question is most toward response efficiency, SEO affectation if any and user experience.
Thanks
1 Answer

Michael Hulet
47,869 PointsIt's always best to use CSS animations and transitions if you can. This is for 3 main reasons:
- CSS transitions and animations are GPU accelerated, so they'll run visibly faster and smoother than JavaScript transitions and animations
- A user can turn off JavaScript, and they won't see your animation/transition if they do
- You have to write more platform-dependent code in JavaScript than CSS
Martin Guzman
11,573 PointsMartin Guzman
11,573 PointsThanks really appreciated it !
peichunliu
33,154 Pointspeichunliu
33,154 PointsThank you for the answer. Really helpful.