Quellcode durchsuchen

fix:beautify-page

何何何 vor 1 Jahr
Ursprung
Commit
c83c25e781
2 geänderte Dateien mit 95 neuen und 4 gelöschten Zeilen
  1. 18 3
      paint-app/src/app/tab3/tab3.page.html
  2. 77 1
      paint-app/src/app/tab3/tab3.page.scss

+ 18 - 3
paint-app/src/app/tab3/tab3.page.html

@@ -71,7 +71,7 @@
     </ion-header>
     <ion-content class="ion-padding">   
       <!-- 用户信息区域 -->
-      <ion-list class="top-list">
+      <!-- <ion-list class="top-list">
         <ion-item (click)="router.navigate([userInfoPage])">
           <ion-avatar slot="start">
             <img src="../../assets/icon/bd.jpg"/>
@@ -83,7 +83,22 @@
           <ion-icon name="chevron-forward" slot="end"></ion-icon>
         </ion-item>
       </ion-list>
-      <div style="text-align: center; margin: 10px;"></div> 
-    </ion-content>
+      <div style="text-align: center; margin: 10px;"></div>  -->
+      <div class="box">
+        <div class="top">
+          <div class="region">
+            <div class="upper">
+              <div class="img-box">
+                <img src="../../assets/icon/tou1.jpg" alt="User Image" />
+              </div>
+              <div class="info">
+                <div class="name">海棠花</div>
+                <div class="no">1517656799</div>
+              </div>
+            </div>
+          </div>
+          <div class="lower">这个人好懒,什么都没有留下~</div>
+        </div>
   </div>
 
+</ion-content>

+ 77 - 1
paint-app/src/app/tab3/tab3.page.scss

@@ -28,4 +28,80 @@
   ion-button {
     margin-top: 20px;
   }
-  
+  
+
+
+
+  .box {
+    width: 100%;
+    margin: auto;
+  }
+  
+  .top {
+    position: relative;
+    padding-top: 80px; /* 使用 px 替代 rpx */
+    width: 100%;
+    height: 400px; /* 使用 px 替代 rpx */
+  }
+  
+  .top:after {
+    width: 140%;
+    height:300px;
+    position: absolute;
+    left: -20%;
+    top: 0;
+    z-index: -1;
+    content: '';
+    border-radius: 0 0 60% 60%;
+    background-color: #426db5;
+  }
+  
+  .region {
+    margin:auto;
+    width: 450px;
+  }
+  
+  .upper {
+  
+      display: flex; /* 使用弹性盒布局,使子元素能够灵活排列 */
+      justify-content: center; /* 在主轴上居中对齐子元素 */
+     align-items: center; /* 在交叉轴上居中对齐子元素 */
+  
+  }
+  
+  .img-box {
+    width: 120px;
+    height: 120px; 
+    border-radius: 50%; /* 设置边框半径为 50%,使盒子变为圆形 */
+    overflow: hidden; /* 确保任何超出部分都被隐藏 */
+  }
+  
+  .img-box img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .info {
+    padding-left: 30px; /* 设置左侧内边距为 30 像素 */
+    line-height: 55px; /* 设置行高为 55 像素,增加文本行之间的垂直间距 */
+    flex-direction: column; /* 将子元素排列为纵向(列)方向 */
+}
+  
+.name {
+  font-size: 20px; /* 设置字体大小为 40 像素 */
+  letter-spacing: 5px; /* 设置字母间距为 5 像素 */
+  color: #FFFFFF; /* 设置字体颜色为白色 */
+}
+  
+.no {
+  font-size: 18px; /* 设置字体大小为 24 像素 */
+  letter-spacing: 2px; /* 设置字母间距为 2 像素 */
+  color: #b3dffe; /* 设置字体颜色为淡蓝色 */
+}
+.lower {
+  display: flex;
+  justify-content: center;
+  line-height: 100px; 
+  font-size: 16px; 
+  color: #b3dffe;
+}