常规的方法是设置border-radius:50%;
但是在微信小程序的头像上,还得加 overflow:hidden;
另外,还要注意父级容器为flex布局。

wxml:<open-data type='userAvatarUrl' ></open-data>wxss:open-data[type="userAvatarUrl"]{    width: 150rpx;    height: 150rpx;    border-radius: 50%;    overflow: hidden;}微信小程序

TAG标签: 微信小程序微信如何换头像

http://www.xiaochengxub.com/read-106621.html