Box.vue
1.07 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
<template>
<div class='box'>
<div class="box-title">
<div class='box-title-arrow'></div>
<div class='box-title-name'>
<slot name="title"></slot>
</div>
</div>
<slot></slot>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: 'Box',
data () {
return {
}
}
}
</script>
<style scoped lang='scss'>
.box {
height: 100%;
width: 100%;
color: #fff;
background: url("~@a/box-bottom.png") no-repeat;
background-size: 100% 76px;
background-position-y: bottom;
position: relative;
&-title {
height: 125px;
width: 100%;
background: url("~@a/box-top.png") no-repeat;
background-size: 100% 100%;
position: relative;
box-sizing: border-box;
padding: 40px 0 0 44px;
&-arrow {
float: left;
width: 20px;
height: 32px;
background: url("~@a/arrow.png") no-repeat;
background-size: cover;
transform: translateY(6px);
}
&-name {
float: left;
padding-left: 30px;
font-size: 34px;
letter-spacing: 8px;
}
}
}
</style>