uni-app 首页瀑布流布局

<view class="pubuBox">
						<view class="pubuItem">
							<view class="item-masonry" v-for="(item, index) in hotSalesList" :key="index"
								@tap="clickRight(item)">
								<view class="positions">
									<image :src="item.pic" mode="widthFix">image>
									<view class="city">{{item.city}}view>
								view>
								<view class="listtitle"> -->
									<view class="listtitle1">{{ item.prodName }}view>
									<view class="listtitle2">
										{{ item.registerDate }}/{{item.mileage}}km
									view>
									<view class="listtitle3">
										<view class="price">
											<text class="symbol">text>
											<text class="big-num">{{parsePrice(item.oriPrice)[0]}}text>
											<text class="small-num">.{{parsePrice(item.oriPrice)[1]}}text>
										view>
									view>
								view>
							view>
						view>
					view>
.pubuBox {
		padding: 22rpx;
	}
	.pubuItem {
		column-count: 2;
		column-gap: 20rpx;
	}
	.item-masonry {
		box-sizing: border-box;
		border-radius: 15rpx;
		overflow: hidden;
		background-color: #fff;
		break-inside: avoid;
		/*避免在元素内部插入分页符*/
		box-sizing: border-box;
		margin-bottom: 20rpx;
		box-shadow: 0px 0px 28rpx 1rpx rgba(78, 101, 153, 0.14);
	}
	.city {
		width: 100%;
		position: absolute;
		bottom: 10rpx;
		text-align: center;
		font-size: 24rpx;
		font-weight: 400;
		color: #FFFFFF;
	}
	.item-masonry .positions {
		width: 100%;
		position: relative;
	}
	.positions image {
		width: 100%;
	}
	.listtitle {
		padding-left: 22rpx;
		/* font-size: 24rpx; */
		padding-bottom: 22rpx;
	}
	.listtitle1 {
		line-height: 39rpx;
		text-overflow: -o-ellipsis-lastline;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		-webkit-box-orient: vertical;
		min-height: 39rpx;
		max-height: 78rpx;
		font-size: 30rpx;
		font-weight: 400;
		color: #333333;
		padding-top: 20rpx;
	}
	.listtitle2 {
		font-size: 26rpx;
		font-weight: 400;
		color: #666666;
		margin-top: 12rpx;
	}
	.listtitle2son {
		font-size: 26px;
		font-weight: 400;
		color: #666666;
	}
	.listtitle3 {
		font-size: 28rpx;
		color: #909399;
		line-height: 32rpx;
		padding-top: 18rpx;
	}
	.Index {
		width: 100%;
		height: 100%;
	}

你可能感兴趣的:(uni-app,css,前端,html)