PolygonItem.vue
1.14 KB
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
<template>
<div class="polygon-div">
<el-image
:src="imageSrc"
fit="fill"
/>
</div>
</template>
<script>
export default {
name: 'PolygonItem',
props: {
imageSrc: {
type: String,
required: true
}
}
}
</script>
<style scoped lang="scss">
.polygon-div{
width: 60px;
height: 80px;
margin:4px auto;
background-color: transparent;
border-top: 1px solid rgba(255,255,255, 0.7);
border-bottom: 1px solid rgba(255,255,255, 0.7);
position: relative;
padding: 10px;
::v-deep {
.el-image {
width: 45px;
height: 60px;
}
}
}
.polygon-div::before{
content: '';
width: 56px;
height: 56px;
position: absolute;
top:11px;
left:-28px;
transform: rotate(45deg);
background-color: transparent;
border-left: 1px solid rgba(255,255,255, 0.7);
border-bottom: 1px solid rgba(255,255,255, 0.7);
}
.polygon-div:after{
content: '';
width: 56px;
height: 56px;
position: absolute;
top:11px;
right:-28px;
transform: rotate(45deg);
background-color: transparent;
border-right: 1px solid rgba(255,255,255, 0.7);
border-top: 1px solid rgba(255,255,255, 0.7);
}
</style>