示例:
html:
<view class="userinfo">
<view class="userinfo-avatar">
<open-data type="userAvatarUrl"></open-data>
</view>
</view>
CSS:
.userinfo {
position: relative;
width: 750rpx;
height: 320rpx;
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
}
.userinfo-avatar{
overflow: hidden;
display: block;
width: 160rpx;
height: 160rpx;
margin: 20rpx;
margin-top: 100rpx;
border-radius: 50%;
border: 2px solid #fff;
box-shadow: 3px 3px 10px rgba(0,0,0,0.2);
}
效果如下图