From b6e4df4603845357b597e2df5b7b2609fa5c7e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8D=89=E9=9E=8B=E6=B2=A1=E5=8F=B7?= <308487730@qq.com> Date: Thu, 30 Mar 2023 20:02:54 +0800 Subject: [PATCH] feat: better LOGO animate --- public/electron.svg | 7 +++++++ public/vite.svg | 20 ++++++++++++++++++++ src/App.scss | 9 ++++++++- src/App.tsx | 5 +++-- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 public/electron.svg create mode 100644 public/vite.svg diff --git a/public/electron.svg b/public/electron.svg new file mode 100644 index 0000000..8a4e381 --- /dev/null +++ b/public/electron.svg @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/public/vite.svg b/public/vite.svg new file mode 100644 index 0000000..c88e31c --- /dev/null +++ b/public/vite.svg @@ -0,0 +1,20 @@ + diff --git a/src/App.scss b/src/App.scss index 78b1263..d02bb4b 100644 --- a/src/App.scss +++ b/src/App.scss @@ -5,7 +5,14 @@ text-align: center; } +.logo-box { + position: relative; + height: 9em; +} + .logo { + position: absolute; + left: calc(50% - 4.5em); height: 6em; padding: 1.5em; will-change: filter; @@ -25,7 +32,7 @@ } @media (prefers-reduced-motion: no-preference) { - .logo { + .logo.electron { animation: logo-spin infinite 20s linear; } } diff --git a/src/App.tsx b/src/App.tsx index 6566091..5c43073 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,9 +9,10 @@ function App() { const [count, setCount] = useState(0) return (