@@ -11,6 +11,14 @@ export const HandbookWrapper = styled.div`
1111 font-weight: 600;
1212 }
1313
14+ .main-content {
15+ display: flex;
16+ flex: 1;
17+
18+ @media (max-width: 750px) {
19+ flex-direction: column;
20+ }
21+ }
1422 .content{
1523 width:100%;
1624 padding-bottom: 2rem;
@@ -35,11 +43,13 @@ export const HandbookWrapper = styled.div`
3543 .page-section{
3644 @media (min-width: 751px){
3745 margin-top: -52rem;
46+ position: relative;
3847 margin-left: 20rem;
3948 padding: 2rem 3rem;
4049 }
4150 @media (max-width: 750px) {
42- margin-top: -6rem;
51+ margin-top: -4rem;
52+ margin-left: 2rem;
4353 }
4454 }
4555
@@ -50,32 +60,39 @@ export const HandbookWrapper = styled.div`
5060 }
5161
5262 .sidebar {
53- margin: 0;
54- padding: 0;
55- width: 250px;
56- background-color:${ ( props ) => props . theme . secondaryLightColor } ;
57- height: 150rem;
58- overflow: auto;
59- transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
63+ margin: 0;
64+ padding: 0;
65+ width: 250px;
66+ background-color:${ ( props ) => props . theme . secondaryLightColor } ;
67+ height: auto;
68+ min-height: 100%;
69+ flex-shrink: 0;
70+ overflow: auto;
71+ transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
6072 }
6173
6274 .sidebar a {
63- display: block;
64- color: black;
65- padding: 16px;
66- text-decoration: none;
75+ display: block;
76+ color: black;
77+ padding: 16px;
78+ text-decoration: none;
6779 }
6880
6981 .sidebar a.active {
70- background-color: ${ ( props ) => props . theme . primaryLightColorTwo } ;
71- color: white;
72- transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
82+ background-color: ${ ( props ) => props . theme . primaryLightColorTwo } ;
83+ color: white;
84+ transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
7385 }
7486
7587 .sidebar a:hover:not(.active) {
76- background-color:${ ( props ) => props . theme . secondaryLightColor } ;
77- color: white;
78- transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
88+ background-color:${ ( props ) => props . theme . secondaryLightColor } ;
89+ color: white;
90+ transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
91+ }
92+
93+ .sidebar-content-container {
94+ display: flex;
95+ min-height: calc(100vh - 10rem); /* 减去header高度 */
7996 }
8097
8198 .page-header-section {
0 commit comments