首页楼层样式

This commit is contained in:
jqtmviyu@gmail.com 2021-02-21 23:24:52 +08:00
parent 0ab0304cb0
commit bb2b60d40c
2 changed files with 39 additions and 3 deletions

View File

@ -29,5 +29,7 @@
image{ image{
/* 宽度等于父盒子的宽度, 才不会主动撑开 */ /* 宽度等于父盒子的宽度, 才不会主动撑开 */
Width:100%; Width:100%;
/* 移除图片标签默认的3px 间隙 */
vertical-align: middle;
} }
</style> </style>

View File

@ -25,16 +25,15 @@
<view class="floor_group" v-for="(item, index) in floordata" :key="index"> <view class="floor_group" v-for="(item, index) in floordata" :key="index">
<!-- 标题 --> <!-- 标题 -->
<view class="floor_group_title"> <view class="floor_group_title">
<image :src="item.floor_title.image_src"></image> <image :src="item.floor_title.image_src" mode="widthFix"></image>
</view> </view>
<!-- 内容 --> <!-- 内容 -->
<view class="floor_group_list"> <view class="floor_group_list">
<navigator class="floor_item" v-for="item2 in item.product_list" :key="item2.name"> <navigator class="floor_item" v-for="item2 in item.product_list" :key="item2.name">
<image :src="item2.image_src"></image> <image :src="item2.image_src" mode="scaleToFill"></image>
</navigator> </navigator>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
@ -111,4 +110,39 @@
} }
} }
/* 楼层 */
.floor {
.floor_group_list {
/* 清除浮动 */
overflow: hidden;
.floor_item {
float: left;
image {
width: 250rpx;
/*
232px x 386 px
232/386 = 250 / ?
*/
height: 207.9741379310345rpx;
}
}
.floor_item:nth-child(1) {
image {
height: 415.948275862069rpx;
}
}
/* 后四张图片加左边框 */
.floor_item:nth-last-child(-n + 4) {
image {
border-left: 4rpx solid #fff;
}
}
/* 后两张图片加上边框 */
.floor_item:nth-last-child(-n + 2) {
image {
border-top: 4rpx solid #fff;
}
}
}
}
</style> </style>