You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<template> <view class="content"> <view class="item" v-for="(item, index) in 16" :key="index"> <image class="bg-img" src="https://picsum.photos/200/300"></image> <view class="shop"> <image src="../../static/recommend-r.png"></image> <view class="lf-line-1">DIOR迪奥</view> </view> </view> </view></template>
<script> export default { data(){ return { } }, created(){ }, methods: { } }</script>
<style lang="scss" scoped="scoped"> .content{ width: 750rpx; height: max-content; box-sizing: border-box; padding: 30rpx 32rpx; display: flex; flex-wrap: wrap; .item{ width: 165rpx; height: 165rpx; border: 1rpx solid #979797; margin-right: 9rpx; position: relative; &:nth-child(4n){ margin-right: 0rpx; } &:nth-child(n+5){ margin-top: 8rpx; } .bg-img{ position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .shop{ width: 100%; height: 100%; background-color: rgba(0,0,0,0.1); display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative; z-index: 2; &>image{ width: 70rpx; height: 70rpx; border-radius: 50%; background-color: #FFFFFF; } &>view{ font-size: 24rpx; color: #FFFFFF; margin-top: 4rpx; width: 100%; text-align: center; } } } }</style>
|