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

Lorenzo Pieri
Lorenzo Pieri
19,772 Points

Animate 3 FULLPAGE Divs

Good evening friends!

I was playing around with a theme I am building and I decided I wanted to go full nuts and delete it all, starting from scratch again! XD (Thats not the problem)

I would like my new theme to feature a body that contains 3 divs (or sections, if one preferes) that stretch for 100% both height and width, each one of them covering the window fully. Now, that would not be a problem. You just go for the trick

html,body {
    height: 100%;
    margin: 0;
}

.div {
   width: 100%;
   height: 100%;
}

This above would do the trick (for IE8 aswell, think about it XD) but that ain't enought (how would it?!).

Now that I have 3 fullpage divs (that at the moment stretch only on the Y axis, I want those DIVs || Sections to take this position:

[ DIV2 ] [ DIV1 ] [ DIV3 ]

Instead of what it is right now: [ DIV1 ] [ DIV2 ] [ DIV3 ]

Not only that! I want to make the transition between the DIVs || Sections animated in 3d so that the overflow is hidden but you can reach those other divs by clicking a button (or something)

Any help?

Appreciated and love you!

1 Answer

Lorenzo Pieri
Lorenzo Pieri
19,772 Points

Pretty much, but the transition between pages should be Horizontal and with a 3D animation that looks like a ROOM VIEW (So the DIVs should also be placed horizontally)

Chris Malcolm
Chris Malcolm
2,909 Points

O i see this site has room and cube transitions, perhaps looking here you may find what you want.. http://tympanus.net/Development/PageTransitions/

Lorenzo Pieri
Lorenzo Pieri
19,772 Points

Yeah, thats exactly where I took the idea from, but I cant manage to work around the codes they are giving, not even from their GitHub repos. I was planning to use the roomLeftIn\Out and roomRightIn\Out for my idea!

Any help on that matter?