mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-15 13:56:43 +08:00
个人中心头像鼠标悬浮修改
This commit is contained in:
BIN
public/images/phone.png
Normal file
BIN
public/images/phone.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 637 B |
@@ -5,7 +5,12 @@
|
|||||||
<el-avatar :src="avatar" :size="116" alt=""></el-avatar>
|
<el-avatar :src="avatar" :size="116" alt=""></el-avatar>
|
||||||
<!-- <span>{{userInfo.name}}</span> -->
|
<!-- <span>{{userInfo.name}}</span> -->
|
||||||
<!-- <el-button type="primary" @click="openAvatar">修改头像</el-button> -->
|
<!-- <el-button type="primary" @click="openAvatar">修改头像</el-button> -->
|
||||||
|
<div @click="openAvatar" class="avatarhover">
|
||||||
|
<img :src="`${webBaseUrl}/images/phone.png`" alt="">
|
||||||
|
<h6>修改头像</h6>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- <el-form :model="form" label-position="right" label-width="80px"> -->
|
<!-- <el-form :model="form" label-position="right" label-width="80px"> -->
|
||||||
<div class="informationItem">
|
<div class="informationItem">
|
||||||
<div class="information-header">
|
<div class="information-header">
|
||||||
@@ -393,7 +398,35 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.avatarhover{
|
||||||
|
width: 116px;
|
||||||
|
height: 116px;
|
||||||
|
background-color: rgba(0, 0, 0, 0.4);
|
||||||
|
border-radius: 50%;
|
||||||
|
position: absolute;
|
||||||
|
cursor:pointer;
|
||||||
|
display: none;
|
||||||
|
left: 0%;
|
||||||
|
top:0px;
|
||||||
|
text-align: center;
|
||||||
|
img{
|
||||||
|
width: 42px;
|
||||||
|
height: 38px;
|
||||||
|
vertical-align: bottom;
|
||||||
|
margin-top: 22px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
h6{
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
.avatar:hover .avatarhover{
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
::v-deep .el-checkbox-button--medium .el-checkbox-button__inner{
|
::v-deep .el-checkbox-button--medium .el-checkbox-button__inner{
|
||||||
// padding: 10px 40px !important;
|
// padding: 10px 40px !important;
|
||||||
width: 146px;
|
width: 146px;
|
||||||
@@ -489,6 +522,8 @@
|
|||||||
// margin: 0 auto;
|
// margin: 0 auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
.avatar{
|
.avatar{
|
||||||
|
width: 116px;
|
||||||
|
height: 116px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
left: 5%;
|
left: 5%;
|
||||||
|
|||||||
Reference in New Issue
Block a user