Fullscreen Layout with Page Transitions

A simple responsive layout with some fancy page transitions. The idea is to show four items initially and expand them. Some additional page transitions are added for inner items.

From our sponsor: Try Mailchimp today.

Today we’d like to share an experimental responsive layout with you. Initially, the layout shows four flexible boxes. When clicking on a box, it will expand to fullscreen and the others will scale down and fade out. When closing the current view, it will move back to the intial position while the other boxes come back up again. Another type of page transition can be seen on the works section where we will show a portfolio item by sliding in a panel from the bottom. The current view gets scaled down and disappears in the back.

All effects are done with CSS transitions and controled by applying classes with JavaScript. The whole layout is flexible and some media queries are added to size down things for smaller screens.

Please note: this only works as intended in browsers that support the respective CSS properties.

The beautiful illustrations used in the works section of the demo are by talented Isaac Montemayor.

Let’s take a look at some screenshots:


The initial screen has the four flexible boxes. Resize the browser window to see them adapting fluidly.


When clicking on a box, it get’s expanded to fullscreen.


The view of a box that is expanded. A content are is revealed and we add a scroll to it when needed.


In the works section, we add a thumbnail grid which will reveal a details panel once we click on an item. The page transition here is the new item sliding in from the bottom and the old view scaling down and disappearing in the back.


The navigation through the items has the same page transition. When we close the item view, it will transition back down and the works view will scale back up again.

We hope you like this little experiment and find it inspiring!

Tagged with:

Mary Lou

ML is a freelance web designer and developer with a passion for interaction design. She studied Cognitive Science and Computational Logic and has a weakness for the smell of freshly ground peppercorns.


Stay up to date with the latest web design and development news and relevant updates from Codrops.

Feedback 158

Comments are closed.
  1. Great demo! I have one suggestion. Since clicking anywhere on a large box makes it larger, it makes sense to me to click anywhere on the larger box should make it smaller (toggle), rather than having to aim for the little “x” in the upper right corner.

    • That would make it impossible to scroll through, say, blog posts.

      But if you remove the close button code, change find( 'span.sh-icon-close' ) to $section, and remove the event.target line (I think, I’m working off heavily modified code for reference here). That should do it, apologies if I’ve missed anything; I suspect there’ll be a little more tweaking of the JS needed.

  2. I have no word about that’s creativity . This website challenging me to what i have worked in past is just zero . I love this website because it helped me to improve the skills.

  3. Thanks so much for this code and demo. The works page could be improved indeed, I think the close button on a details page should be in the upper-right corner.

  4. Wow amazing!
    So smooth to, not sure about when you go really small looks like it would be go to add a small bar underneat with contact information on mobile? With a button like call me now?

  5. Really neat! Noob question… can you add any content to the large boxes? Say woo-commerce???

  6. This is quite inspiring, and paired with the History API it would make for quite an intuitive and fluid site. Great work!

  7. I’m a little disappointed.
    Because I’m working on the same concept for my portfolio, and your solution ” JavaScript assist” is definitely better than mine (my java sucks).
    Next step for me: adapt this to WP.

    Brilliant demonstration, nicely done.

  8. Brilliant example design. Btw, anyway to include keyboard shortcut ‘esc’ to trigger the “X” close panel?

    • You could add a keydown function to the jquery. The close for the close icon is bl-icon-close, so try:
      $(document).on(‘keydown’, function(e){
      if (e.keyCode === 27){
      $(‘span.bl-icon-close’).click(); }

  9. First of all, I absolutely love this way of re-thinking webdesign! I’m a student and need a portfolio website to show off my work to search for an internship and was wondering if I could use this code as the base for my website? I will be editing parts of it to my needs if it’s okay with you. Again, great work!