From 715af9e8979a344c2b35433ea612f80f3f4270bf Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 16 Oct 2024 10:16:01 +0200 Subject: Experiment with view transitions --- src/style.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/style.css b/src/style.css index c920dc8..843e9da 100644 --- a/src/style.css +++ b/src/style.css @@ -30,6 +30,28 @@ } } +@keyframes move-out { + from { transform: translateY(0%); } + to { transform: translateY(-100%); } +} + +@keyframes move-in { + from { transform: translateY(100%); } + to { transform: translateY(0%); } +} + +@view-transition { + navigation: auto; +} + +::view-transition-old(root) { + animation: 0.4s ease-in both move-out; +} + +::view-transition-new(root) { + animation: 0.4s ease-in both move-in; +} + @media (max-width: 750px) { h1 { font-size: 2.0rem; } h2 { font-size: 1.5rem; } -- cgit v1.2.3