您好,登錄后才能下訂單哦!
這篇文章主要介紹微信小程序如何使用open-data更改頭像顯示樣式,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!
代碼如下:
<view class='zhubo'>
<view class='zhuboLeft'>
<view class='zhubo-avater'>
<image class='zhuboIcon' src='../../image/video-list/avater.jpg'></image>
</view>
<view class='zhuboDes'>
<view class='zhubo-name'>東辰-寒冰</view>
<view class='zhubo-from'>來自虎牙直播</view>
</view>
</view>
<view class='zhubo-Right'>關(guān)注</view>
</view>
/*主播信息 */
.zhubo{
margin: 0 28rpx 0;
height: 144rpx;
display:flex;
justify-content:space-between;
align-items: center;
}
.zhuboIcon{
width:80rpx;
height: 80rpx;
border-radius: 50%;
overflow: hidden;
}
.zhuboLeft{
display: flex;
}
.zhubo-avater{
padding-right: 20rpx;
display: flex;
align-items: center;
}
.zhubo-name{
font-weight: 700;
}
.zhubo-from{
color: #A6A6A6;
}
效果二:
<view class="userinfo">
<view class="userinfo-avatar">
<open-data type="userAvatarUrl"></open-data>
</view>
<open-data type="userNickName"></open-data>
</view>
.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: 50rpx;
border-radius: 50%;
border: 2px solid #fff;
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
}
.userinfo{
/* color: #fff; */
font-size: 14px;
background-color: #c0c0c0;
border-radius:40%;
}
以上是“微信小程序如何使用open-data更改頭像顯示樣式”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。