BoxTitle.vue
924 Bytes
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
<!--
* @Description:
* @Author: huyue
* @Date: 2023-07-06 11:46:13
* @LastEditors: huyue
* @LastEditTime: 2023-07-07 18:01:41
-->
<template>
<div class="main-box">
<div class="trapezoid"> <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;
background-image: url('../assets/images/title-bg.png');
background-repeat: no-repeat;
background-size: 9.04vw 3.33vh;
}
.trapezoid {
height: 3.33vh;
.text-box {
// width: 126px;
height: 3.33vh;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 14px;
color: #FFFFFF;
line-height: 3.33vh;
margin-left: 1.67vw;
}
}
</style>