BoxTitle.vue
1.38 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<template>
<div class="main-box">
<div class="trapezoid"><div class="point">....</div></div>
<div class="right-box">
<div class="trangle"></div>
<div class="text-box">{{title}}</div>
</div>
</div>
</template>
<script>
export default {
name: 'BoxTitle',
props: {
title: {
type: String,
default: '标题'
}
},
data() {
return {}
},
mounted() {},
methods: {}
}
</script>
<style lang="scss" scoped>
.main-box {
position: relative;
}
.trapezoid {
width: 0;
height: 0;
border-top: 30px solid #0085CD;
border-right: 8px solid transparent;
border-left: 10px solid #0085CD;
.point {
position: absolute;
top: 1px;
left: 1px;
font-size: 19px;
color: #fff;
transform: rotate(90deg);
}
}
.right-box {
position: absolute;
top: 0;
left: 15px;
display: flex;
.trangle {
width: 0;
height: 0;
border: #0085CD;
border-style: solid;
border-width: 20px 8px 0 0;
border-top: 30px solid transparent;
}
.text-box {
width: 126px;
height: 30px;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 30px;
padding-left: 2px;
background-image: linear-gradient(270deg, #6578ff00 0%, #5542ff87 53%, #0085CD 100%);
}
}
</style>