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

Stars Translate3d

Hi Guys, i have a quick question about the stars and translate3d.

In the .star rule we are positioning the stars 180px down on the y axis which i get. However what makes them slide back up to the center? There's no translate3d function needed to bring the stars back up 180px to the center?

thanks!

1 Answer

Most likely you are asking for an animation to "move" the element on the y-axis with the transform CSS option with translate3d.

To move it back to position using that option you need to give the transform option with translated3d back to 0px on the y-axis on whatever action you want.

Example :

.div { transform: translate3d(0, 180px, 0); }

.div:hover { transform: translate3d(0); }

Also found: http://jsfiddle.net/gmCU6/1/