@@ -11,6 +11,14 @@ export const HandbookWrapper = styled.div`
11
11
font-weight: 600;
12
12
}
13
13
14
+ .main-content {
15
+ display: flex;
16
+ flex: 1;
17
+
18
+ @media (max-width: 750px) {
19
+ flex-direction: column;
20
+ }
21
+ }
14
22
.content{
15
23
width:100%;
16
24
padding-bottom: 2rem;
@@ -35,11 +43,13 @@ export const HandbookWrapper = styled.div`
35
43
.page-section{
36
44
@media (min-width: 751px){
37
45
margin-top: -52rem;
46
+ position: relative;
38
47
margin-left: 20rem;
39
48
padding: 2rem 3rem;
40
49
}
41
50
@media (max-width: 750px) {
42
- margin-top: -6rem;
51
+ margin-top: -4rem;
52
+ margin-left: 2rem;
43
53
}
44
54
}
45
55
@@ -50,32 +60,39 @@ export const HandbookWrapper = styled.div`
50
60
}
51
61
52
62
.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);
60
72
}
61
73
62
74
.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;
67
79
}
68
80
69
81
.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);
73
85
}
74
86
75
87
.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高度 */
79
96
}
80
97
81
98
.page-header-section {
0 commit comments