xiangpei
2025-05-13 4c4995771ce83925a2d69dedc11c4404d9b77875
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<template>
  <div class="first-page-advert">
    <div
      class="item hover-pointer"
      @click="linkTo(item.url)"
      :style="{
        backgroundImage: `linear-gradient(to right, ${item.fromColor}, ${item.toColor})`,
      }"
      v-for="(item, index) in options.list"
      :key="index"
    >
      <div>
        <span class="line top-line"></span>
        <p>{{ item.name }}</p>
        <span class="line btm-line"></span>
        <p>{{ item.describe }}</p>
      </div>
      <img :src="item.img" width="170" height="170" alt="" />
    </div>
  </div>
</template>
<script>
export default {
  props: {
    data: {
      type: Object,
      default: null
    }
  },
  data () {
    return {
      options: this.data.options // 装修数据
    };
  }
};
</script>
<style lang="scss" scoped>
.first-page-advert {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  // margin-top: -10px;
  .item {
    width: 393px;
    height: 170px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      margin-left: 20px;
      transition: transform 0.5s, -webkit-transform 0.5s, -moz-transform 0.5s;
      &:hover {
        transform: translateX(-5px);
      }
    }
 
    &:nth-of-type(1),
    &:nth-of-type(2),
    &:nth-of-type(3) {
      margin-top: 0;
    }
 
    p:nth-of-type(1) {
      margin: 3px 0;
      font-size: 18px;
      color: #fff;
    }
    p:nth-of-type(2) {
      margin-top: 3px;
      color: #fff;
    }
  }
  .line {
    position: relative;
    display: block;
    height: 2px;
    background: url(../../../assets/images/festival_icon.png);
    z-index: 1;
  }
  .top-line {
    width: 78px;
    background-position: -1px -3px;
  }
  .btm-line {
    background-position: 0 -11px;
    width: 154px;
  }
}
.modal-top-advert {
  align-items: start;
  padding: 0 30px;
  .exhibition {
    width: 300px;
    height: 50px;
  }
}
</style>