Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialCharlie Person
8,692 PointsHow do I activate an animation automatically when I refresh the page?
Guil shows you how to do it with a hover element but not without one.
1 Answer
Zhihao Wang
9,687 PointsInstead of setting your animation to hover, just set it to a default styling. Here's what I mean.
.animationbackground{
animation: /** Your Animation Here **/
}
This would tell the browser to start the animation imediately, instead of waiting for something like a hover effect like this:
.animationbackground:hover{
animation: /** your Animation here **/
}
Happy Coding!
Charlie Person
8,692 PointsCharlie Person
8,692 PointsTHANKS BUDDY :)
Zhihao Wang
9,687 PointsZhihao Wang
9,687 PointsHey no problem!
I'm glad I could help.
Cheers!