Преглед на файлове

React项目: 布局样式微调

大侠 преди 2 години
родител
ревизия
e0157b88df
променени са 2 файла, в които са добавени 11 реда и са изтрити 3 реда
  1. 7 0
      15_React/day-7/code/my-app/src/index.css
  2. 4 3
      15_React/day-7/code/my-app/src/layout/index.css

+ 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%;
 }