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 trial

CSS

onload Pseudo class?

Is there a pseudo class for "on load" that anyone knows about? I can't get anything to work and don't want to use jquery... mostly because I don't know jquery very well. I was hoping to perform a scale and rotate animation on load to my selector.

2 Answers

Edouard Reinach
Edouard Reinach
2,067 Points

You can't do that.

CSS only understand two kind of user-triggered event: hover and click.

That's it.

onLoad() is a method provided by jquery. Listening to this event is something only jquery can do.

I suspected as much. Thank you!