titlesection.vue
1.03 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
<template>
<div class="title">
<span>{{title}}</span>
</div>
</template>
<script>
export default {
name: 'titlesection',
props:['title'],
created() {
console.log(this.title)
}
}
</script>
<style scoped>
.title {
height: 30px;
line-height: 30px;
padding-left: 60px;
background: url("../assets/img/titlebg.png") no-repeat;
background-size: 100% 100%;
font-size: 14px;
font-weight:500;
color:rgba(255,255,255,1);
}
.title span{
position: relative;
display: inline-block;
box-sizing: border-box;
}
.title span:before{
content: '';
position: absolute;
top:0;
left: -55px;
width: 50px;
height: 30px;
background: url("../assets/img/titletexticon.png") no-repeat 0 center;
background-size: 100% 35%;
}
.title span:after{
content: '';
position: absolute;
top:0;
right: -55px;
width: 50px;
height: 30px;
background: url("../assets/img/titletexticon.png") no-repeat 0 center;
background-size: 100% 35%;
}
</style>