antd使用Layout组件,Content内容过多,造成页面塌

2021-01-21  本文已影响0人  Poppy11

设置Layout的最小高度为可视区域的高度

  <Layout style={{ minHeight: document.documentElement.clientHeight }}>
      <Header className="header">
        <img className="logo" src={logo} />
      </Header>
      <Content style={{ marginTop: 64}}>
        <div className="site-layout-background" style={{ padding: 24, minHeight: 380 }}>
          <BrowserRouter>
            <Switch>
              <Route path={url + 'manage'} component={Manage} />
              <Route path='/view' component={View} />
              <Route path={url + 'submit'} component={Submit} />
            </Switch>
          </BrowserRouter>
        </div>
      </Content>
      <Footer style={{ textAlign: 'center' }}>Newegg ©2021</Footer>
    </Layout>
上一篇 下一篇

猜你喜欢

热点阅读