背景模糊
This commit is contained in:
parent
6fab9ab63d
commit
ef0d1b59fb
@ -2,6 +2,7 @@
|
||||
<view class="user">
|
||||
<!-- 1. 已登录 -->
|
||||
<block v-if="userInfo.nickName">
|
||||
<image class="user_avatar_bg" :src="userInfo.avatarUrl" mode="aspectFill"></image>
|
||||
<image class="user_avatar" :src="userInfo.avatarUrl"></image>
|
||||
<text class="user_nickName">{{userInfo.nickName}}</text>
|
||||
</block>
|
||||
@ -34,11 +35,13 @@ page {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.user {
|
||||
position: relative;
|
||||
height: 330rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
.user_btn {
|
||||
background-color: #07c160;
|
||||
color: #fff;
|
||||
@ -56,6 +59,17 @@ page {
|
||||
.user_nickName {
|
||||
font-size: 32rpx;
|
||||
margin-top: 20rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.user_avatar_bg {
|
||||
width: 120%;
|
||||
height: 120%;
|
||||
position: absolute;
|
||||
left: -10%;
|
||||
top: -10%;
|
||||
z-index: -1;
|
||||
filter: blur(30px) grayscale(20%);
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user