From ca34845795e553dd3f5fc1a35a1d70f0c9ebba45 Mon Sep 17 00:00:00 2001 From: zjt <937178071@qq.com> Date: Wed, 22 Nov 2023 20:25:26 +0800 Subject: [PATCH] feat: self adjusted --- src/App.css | 5 + src/App.tsx | 382 ++++++++++++++++++++++++++++------------------------ 2 files changed, 208 insertions(+), 179 deletions(-) diff --git a/src/App.css b/src/App.css index 917cb39..d9de53d 100644 --- a/src/App.css +++ b/src/App.css @@ -7,6 +7,11 @@ transition: 0.5s; } +#root { + overflow: hidden; + width: 100vw; +} + .overlap>* { transition: 0.5s; } diff --git a/src/App.tsx b/src/App.tsx index f452cbf..7e19939 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,193 +1,217 @@ -import React from "react"; +import React, { useState } from "react"; import "./App.css"; -export default function App () { +export default function App() { + const designWidth = 1430; + const designHeight = 5550; + const [scale, setScale] = useState(window.innerWidth / designWidth); + const innerWidth = document.body.clientWidth; + return ( -
-
-- To Making Progress Happen - . -
-+
-
-
-- To Making Progress Happen - . -
-liberate art and make design progress
-+ To Making Progress Happen + . +
++
++
++ To Making Progress Happen + . +
liberate art and make design progress
+