From 50ec19521861dafb14f6c59a5817ae1c316f9308 Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 14 Aug 2023 23:03:37 +0800 Subject: [PATCH] feat: add animation --- docs/index.md | 33 +++++++++++++++++++++++++++++++++ docs/zh/index.md | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) diff --git a/docs/index.md b/docs/index.md index 0c85af1..a356ef0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -38,6 +38,39 @@ hero: --vp-home-hero-image-filter: blur(40px); } +.image-bg { + position: absolute; + content: ""; + top: 5vw; + left: 0; + right: 0; + z-index: -1; + height: 100%; + width: 100%; + margin: 0 auto; + transform: scale(0.75); + -webkit-filter: blur(5vw); + -moz-filter: blur(5vw); + -ms-filter: blur(5vw); + filter: blur(5vw); + background: linear-gradient(270deg, #0fffc1, #7e0fff); + background-size: 200% 200%; + animation: animateGlow 10s ease infinite; +} + + +@keyframes animateGlow { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} + @media (min-width: 640px) { :root { --vp-home-hero-image-filter: blur(56px); diff --git a/docs/zh/index.md b/docs/zh/index.md index 142f316..d7b97df 100644 --- a/docs/zh/index.md +++ b/docs/zh/index.md @@ -38,6 +38,39 @@ hero: --vp-home-hero-image-filter: blur(40px); } +.image-bg { + position: absolute; + content: ""; + top: 5vw; + left: 0; + right: 0; + z-index: -1; + height: 100%; + width: 100%; + margin: 0 auto; + transform: scale(0.75); + -webkit-filter: blur(5vw); + -moz-filter: blur(5vw); + -ms-filter: blur(5vw); + filter: blur(5vw); + background: linear-gradient(270deg, #0fffc1, #7e0fff); + background-size: 200% 200%; + animation: animateGlow 10s ease infinite; +} + + +@keyframes animateGlow { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} + @media (min-width: 640px) { :root { --vp-home-hero-image-filter: blur(56px);