Jelajahi Sumber

React项目: 布局样式微调

大侠 2 tahun lalu
induk
melakukan
e0157b88df

+ 7 - 0
15_React/day-7/code/my-app/src/index.css

@@ -5,9 +5,16 @@ body {
     sans-serif;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
+  width: 100vw;
+  height: 100vh;
 }
 
 code {
   font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
     monospace;
 }
+
+#root {
+  width: 100%;
+  height: 100%;
+}

+ 4 - 3
15_React/day-7/code/my-app/src/layout/index.css

@@ -1,6 +1,6 @@
 .layout {
-  width: 100vw;
-  height: 100vh;
+  width: 100%;
+  height: 100%;
 
   display: flex;
 }
@@ -38,5 +38,6 @@
 }
 
 .ant-menu {
-  min-height: 100vh;
+  box-sizing: border-box;
+  height: 100%;
 }