图片高度不固定

version/0412
shuxiaoquan 9 months ago
parent c4f287f243
commit 692efa83e4
  1. 8
      pages/activity/newGoods.vue
  2. 8
      pages/activity/newsshop.vue

@ -170,11 +170,11 @@
.firGoods {
width: 100%;
height: 548rpx;
height: 510rpx;
background-image: url('https://www.royaum.com.cn/static/newGoods/top.png');
background-repeat: no-repeat; /* 不重复平铺背景图片 */
background-position: center; /* 居中显示背景图片 */
background-size: cover; /* 拉伸并填充至元素内部 */
background-repeat: no-repeat; /* 不重复平铺背景图片 */
background-position: center top; /* 居中显示背景图片 */
background-size: 100% auto; /* 拉伸并填充至元素内部 */
.topLine {
display: flex;

@ -12,7 +12,7 @@
<view class="newsshop-bd" v-if="shopList.length>0" v-for="(item,index) in shopList" :key="i">
<view class="newsshop-sale">
<view class="a">
<image :src="item.col_pic" mode="aspectFill"></image>
<image :src="item.col_pic" mode="widthFix"></image>
</view>
<view class="info">
<view class="li b">
@ -159,12 +159,10 @@
.a {
width: 100%;
height: 93rpx;
overflow: hidden;
image {
background-size: cover;
display: block;
width: 100%;
height: 100% !important;
}
}

Loading…
Cancel
Save