From b7baa733c57fc5236a08bd978f6bbdf6d88c1899 Mon Sep 17 00:00:00 2001 From: "RELIAS\\wcoleman" Date: Mon, 16 Oct 2017 18:44:57 -0400 Subject: [PATCH] added css and js transitions --- 05 - Flex Panel Gallery/index-START.html | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index c6509bed02..1da1d9b35d 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -24,6 +24,7 @@ .panels { min-height:100vh; overflow: hidden; + display: flex; } .panel { @@ -41,6 +42,11 @@ font-size: 20px; background-size:cover; background-position:center; + flex: 1; + justify-content: center; + align-items: center; + display: flex; + flex-direction: column; } @@ -54,6 +60,26 @@ margin:0; width: 100%; transition:transform 0.5s; + flex: 1 0 auto; + display: flex; + justify-content: center; + align-items: center; + } + + .panel > *:first-child { + transform: translateY(-100%); + } + + .panel.open-active > *:first-child { + transform: translateY(0); + } + + .panel > *:last-child { + transform: translateY(100%); + } + + .panel.open-active > *:last-child { + transform: translateY(0); } .panel p { @@ -68,6 +94,7 @@ .panel.open { font-size:40px; + flex: 5; } @@ -102,7 +129,21 @@