From f3fdeb3543e463774082fb56376b08195dbe7622 Mon Sep 17 00:00:00 2001 From: Cloudburst <18114966+C10udburst@users.noreply.github.com> Date: Mon, 3 Oct 2022 10:42:02 +0200 Subject: [PATCH] display prop doesnt work in animation it seems --- src/pages/repos.css | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/src/pages/repos.css b/src/pages/repos.css index 5be2217..5416aa8 100644 --- a/src/pages/repos.css +++ b/src/pages/repos.css @@ -1,19 +1,32 @@ @keyframes five-s-hide { - 0% { display: block; } - 80% { display: block; } - 100% { display: none; } + 0% { } + 80% { } + 100% { + height: 0; + padding: 0; + margin: 0; + } } @keyframes five-s-show { - 0% { display: none; } - 80% { display: none; } - 100% { display: block; } + 0% { + height: 0; + padding: 0; + margin: 0; + } + 80% { + height: 0; + padding: 0; + margin: 0; + } + 100% { } } -.swap-child *:nth-child(1) { +.swap-child > *:nth-child(1) { animation: five-s-hide 5s linear 0s 1 normal forwards; + overflow: hidden; } -.swap-child *:nth-child(2) { - display: none; +.swap-child > *:nth-child(2) { animation: five-s-show 5s linear 0s 1 normal forwards; + overflow: hidden; } \ No newline at end of file