Jelajahi Sumber

修改身份卡全屏显示

roose 4 tahun lalu
induk
melakukan
66844dedcd

+ 2 - 1
pages/idCardDetail/idCardDetail.wxml

@@ -1,6 +1,7 @@
 <wxs module="urls" src="../../utils/photoUrl.wxs"></wxs>
 <view class="home">
-	<image src="/images/shenfenka.jpg" style="width:750rpx;height:1334rpx"></image>
+	<image class="bg-photo" src="/images/shenfenka.jpg" ></image>
+	<!-- style="width:750rpx;height:1334rpx" -->
 	<image class="photo" src="{{urls.url(info.headPicPath)}}"></image>
 
 	<view class="userName">

+ 20 - 7
pages/idCardDetail/idCardDetail.wxss

@@ -2,13 +2,25 @@
   width: 180rpx;
   height: 180rpx;
   position: absolute;
-  top: 450rpx;
+  top:34%;
   left: 300rpx
 }
 
+.home {
+  width: 100%;
+  height: 100%;
+  position: absolute;
+  z-index: -99999;
+}
+
+.home .bg-photo {
+  width: 100%;
+  height: 100%;
+}
+
 .userName {
   position: absolute;
-  top: 700rpx;
+  top: 52%;
   /* left: 310rpx; */
   text-align: center;
   width: 100%;
@@ -16,7 +28,7 @@
 
 .userInfo {
   position: absolute;
-  top: 820rpx;
+  top: 61%;
   left: 180rpx;
   font-size: 26rpx;
   width: 400rpx;
@@ -28,14 +40,15 @@
 
 .zhang {
   position: absolute;
-  top: 940rpx;
+  top: 75%;
   left: 480rpx;
-  width: 200rpx;
-  height: 200rpx
+  width: 180rpx;
+  height: 180rpx
 }
+
 .time {
   position: absolute;
-  top: 1250rpx;
+  top: 95%;
   width: 100%;
   text-align: center;
   color: white;