myself.vue
1.65 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
78
79
80
81
82
83
84
<template>
<div class="myself-container">
<div class="header-bg">
<img class="img-avatar" src="../images/avatar.png" />
<img class="img-bg" src="../images/bg4.jpg" />
</div>
<div class="my-body">
<div class="my-name">RF</div>
<div class="my-job">Running | Football</div>
<div class="my-desc">
个人博客
</div>
</div>
</div>
</template>
<script>
export default {
name: "myself",
components: {},
props: {},
computed: {},
data() {
return {};
},
watch: {},
created() { },
mounted() { },
beforeDestroy() { },
methods: {},
};
</script>
<style lang="less" scoped>
.myself-container {
background-color: #fff;
margin-top: 20px;
border-radius: 4px;
.header-bg {
height: 150px;
border-radius: 4px;
position: relative;
.img-avatar {
width: 100px;
height: 100px;
position: absolute;
bottom: -50px;
left: calc(~"50% - 50px");
border-radius: 50%;
z-index: 99;
&:hover {
animation: btnGroups 1s linear;
}
}
.img-bg {
position: absolute;
width: 100%;
height: 100%;
object-fit: cover;
}
}
.my-body {
margin-top: 74px;
display: flex;
flex-direction: column;
align-items: center;
.my-name {
font-size: 16px;
font-weight: bold;
margin-bottom: 10px;
}
.my-job {
font-size: 14px;
color: @thinHighlightColor;
}
.my-desc {
font-size: 14px;
color: @assistColor;
padding: 20px 40px;
line-height: 26px;
}
}
}
</style>