金诚优选前端代码
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.

82 lines
1.4 KiB

  1. <template>
  2. <view class="content">
  3. <view class="item" v-for="(item, index) in 16" :key="index">
  4. <image class="bg-img" src="https://picsum.photos/200/300"></image>
  5. <view class="shop">
  6. <image src="../../static/recommend-r.png"></image>
  7. <view class="lf-line-1">DIOR迪奥</view>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. data(){
  15. return {
  16. }
  17. },
  18. created(){
  19. },
  20. methods: {
  21. }
  22. }
  23. </script>
  24. <style lang="scss" scoped="scoped">
  25. .content{
  26. width: 750rpx;
  27. height: max-content;
  28. box-sizing: border-box;
  29. padding: 30rpx 32rpx;
  30. display: flex;
  31. flex-wrap: wrap;
  32. .item{
  33. width: 165rpx;
  34. height: 165rpx;
  35. border: 1rpx solid #979797;
  36. margin-right: 9rpx;
  37. position: relative;
  38. &:nth-child(4n){
  39. margin-right: 0rpx;
  40. }
  41. &:nth-child(n+5){
  42. margin-top: 8rpx;
  43. }
  44. .bg-img{
  45. position: absolute;
  46. top: 0;
  47. left: 0;
  48. width: 100%;
  49. height: 100%;
  50. }
  51. .shop{
  52. width: 100%;
  53. height: 100%;
  54. background-color: rgba(0,0,0,0.1);
  55. display: flex;
  56. flex-direction: column;
  57. justify-content: center;
  58. align-items: center;
  59. position: relative;
  60. z-index: 2;
  61. &>image{
  62. width: 70rpx;
  63. height: 70rpx;
  64. border-radius: 50%;
  65. background-color: #FFFFFF;
  66. }
  67. &>view{
  68. font-size: 24rpx;
  69. color: #FFFFFF;
  70. margin-top: 4rpx;
  71. width: 100%;
  72. text-align: center;
  73. }
  74. }
  75. }
  76. }
  77. </style>