瀏覽代碼

fix:修改一些样式bug

aamin 1 年之前
父節點
當前提交
e1c73518d5
共有 3 個文件被更改,包括 12 次插入7 次删除
  1. 1 4
      src/assets/styles/base.css
  2. 9 1
      src/pages/Home/index.module.scss
  3. 2 2
      src/pages/Home/index.tsx

+ 1 - 4
src/assets/styles/base.css

@@ -57,10 +57,7 @@ textarea {
 #root {
   width: 100vw;
   height: 100vh;
-  min-width: 1600px;
-  min-height: 900px;
-  overflow: auto;
-  overflow-y: overlay;
+  overflow: hidden;
   /* 普通文字按钮的颜色 */
   /* 按钮的危险颜色 */
   /* antd分页器样式 */

+ 9 - 1
src/pages/Home/index.module.scss

@@ -17,13 +17,21 @@
       left: 1.5%;
       top: 4%;
     }
+    .thembBg{
+      width: 100%;
+      height: 100%;
+      position: absolute;
+      top: 0;
+      left: 0;
+      object-fit: fill;
+    }
 
     .prgress-box {
       width: 93.2%;
       height: 2px;
       // background: #4BB582;
       position: absolute;
-      bottom: 16.45vh;
+      bottom: 16.6vh;
       left: 50%;
       transform: translateX(-50%);
       // position: relative;

+ 2 - 2
src/pages/Home/index.tsx

@@ -363,10 +363,10 @@ const Home = () => {
     <div
       className={styles.home}
       style={{
-        backgroundImage: `url(${mode === "themb" ? thembBg : anwserBg})`,
-        backgroundSize: "100% 100%",
       }}
     >
+      <img className="thembBg" style={{opacity: mode === 'themb' ? 1: 0}} src={thembBg} alt="" />
+      <img className="thembBg" style={{opacity: mode !== 'themb' ? 1: 0}} src={anwserBg} alt="" />
       {/* 顶部图标区域 */}
       <img
         className="btn_back"