fix: 解决页面body样式污染问题
This commit is contained in:
@@ -6,13 +6,13 @@ html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
html, body {
|
||||
width: 100%;
|
||||
html, .main-body {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
.main-body {
|
||||
font-family: "DM Sans", sans-serif;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -20,7 +20,7 @@ body {
|
||||
flex-direction: column;
|
||||
//overflow: hidden;
|
||||
//overflow-x: hidden;
|
||||
//background-image: url("@/assets/images/background.png");
|
||||
background-image: url("@/assets/images/background.png");
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
padding: 20px;
|
||||
@@ -43,8 +43,8 @@ h1,p{
|
||||
border-radius: 10px;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
max-width: 1510px;
|
||||
max-height: 670px;
|
||||
max-width: 1500px;
|
||||
max-height: 650px;
|
||||
background: linear-gradient(180deg, #e0e9fd 0%, #e9ecf1 90%);
|
||||
box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.4);
|
||||
display: flex;
|
||||
|
@@ -1,9 +1,16 @@
|
||||
import React from 'react'
|
||||
import React, { useEffect } from 'react'
|
||||
import LeftArea from '@/layout/default/left-area'
|
||||
import MainArea from '@/layout/default/main-area'
|
||||
import RightArea from '@/layout/default/right-area'
|
||||
import './index.less'
|
||||
import Footer from '@/components/Footer'
|
||||
const DefaultLayOut: React.FC = () => {
|
||||
useEffect(() => {
|
||||
document.body.classList.add('main-body')
|
||||
return () => {
|
||||
document.body.classList.remove('main-body')
|
||||
}
|
||||
}, [])
|
||||
return (
|
||||
<>
|
||||
<div className='app-container'>
|
||||
@@ -11,6 +18,7 @@ const DefaultLayOut: React.FC = () => {
|
||||
<MainArea />
|
||||
<RightArea />
|
||||
</div>
|
||||
<Footer />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user