diff --git a/src/base/withPage.tsx b/src/base/withPage.tsx index 4fa7015..a97f6c0 100644 --- a/src/base/withPage.tsx +++ b/src/base/withPage.tsx @@ -9,6 +9,7 @@ interface PageProps { const StyleAnim = styled(OpacityIn)` position: relative; + height: 100%; ` function withPage(WrappedComponent: FC) { diff --git a/src/index.css b/src/index.css index b69b205..e91f86d 100644 --- a/src/index.css +++ b/src/index.css @@ -3,10 +3,12 @@ @import "@blueprintjs/icons/lib/css/blueprint-icons.css"; @import "@blueprintjs/table/lib/css/table.css"; -/* html, -body { +html,body, #root{ height: 100%; } -#root { - min-height: 100%; -} */ + +.container { + max-width: 1200px; + margin: 0 auto; +} + diff --git a/src/layout/GlobalStyles.ts b/src/layout/GlobalStyles.ts index 02bc630..56c2963 100644 --- a/src/layout/GlobalStyles.ts +++ b/src/layout/GlobalStyles.ts @@ -1,7 +1,5 @@ import { createGlobalStyle } from "styled-components" export const GlobalStyles = createGlobalStyle` - html,body, #root{ - height: 100%; - } + ` diff --git a/src/layout/base.tsx b/src/layout/base.tsx index 8d50bd4..0a9b4c3 100644 --- a/src/layout/base.tsx +++ b/src/layout/base.tsx @@ -1,5 +1,5 @@ import { Alignment, Button, Dialog, DialogBody, DialogFooter, Menu, MenuDivider, MenuItem, Navbar, Popover } from "@blueprintjs/core" -import { FC, ReactNode, useState } from "react" +import { ReactNode, useState } from "react" import { NavLink, useHistory } from "react-router-dom" import styled from "styled-components" import { GlobalStyles } from "./GlobalStyles" @@ -34,7 +34,7 @@ function BaseLayout(props: PageProps) { 东风天堂 - +