wangfumin 3 месяцев назад
Родитель
Сommit
563120cc22
2 измененных файлов с 15 добавлено и 14 удалено
  1. 1 1
      pages/index/index.wxml
  2. 14 13
      pages/index/index.wxss

+ 1 - 1
pages/index/index.wxml

@@ -56,7 +56,7 @@
           <image src="{{urlImg + item.indexImg}}" alt="展览资讯" class="news-img" mode="aspectFill"></image>
           <view class="news-content">
             <text class="news-title">{{item.title}}</text>
-            <text class="news-desc">⇀</text>
+            <!-- <text class="news-desc">⇀</text> -->
           </view>
         </view>
       </view>

+ 14 - 13
pages/index/index.wxss

@@ -135,26 +135,26 @@
 }
 
 .news-content {
-  position: absolute;
-  top: 0;
   width: 100%;
-  height: 212rpx;
-  background: linear-gradient(90deg, rgba(177, 150, 123, 0) 0%, #B1967B 100%);
+  height: 60rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  opacity: 0.8;
+  position: absolute;
+  bottom: 0;
+  background: linear-gradient(180deg, rgba(256, 256, 256, 0) 0%, rgba(0, 0, 0, 0.7) 100%);
 }
 
 .news-title {
   font-family: "heavy";
-  width: 300rpx;
-  text-align: right;
   font-size: 32rpx;
-  font-weight: 800;
-  margin: 32rpx;
-  float: right;
-  color: #FFFFFF;
-  display: -webkit-box;
-  -webkit-line-clamp: 2;
-  -webkit-box-orient: vertical;
+  color: #fff;
+  font-weight: bold;
+  white-space: nowrap;
   overflow: hidden;
+  text-overflow: ellipsis;
+  padding: 0 16rpx;
 }
 
 .news-desc {
@@ -197,6 +197,7 @@
 .exhibition-img {
   width: 100%;
   height: 412rpx;
+  transform: translateY(-25%)
 }
 
 .exhibition-info {