实现微信小程序常见的用户效果
在开发微信小程序过程中,如果要实现常见的用户效果,应该如何操作呢?
实现微信小程序常见的用户效果
wxml
代码说明: open-data没有办法直接给一个class然后控制类名,但是可以通过控制外部盒子达到控制它本身的大小以及形状的目的。
wxss
.circle{
width:930rpx;
height:930rpx;
border-radius:465rpx;
background-color:#2ca6cb;
margin-top:-666rpx;
margin-left:-90rpx;
display:flex;
align-items:center;
flex-direction:column-reverse;
}
.userAvatar{
width:80px;
height:80px;
border-radius:40px;
margin-bottom:-30px;
overflow: hidden;
}
说明:通过flex布局控制头像的位置。
以上就是微信小程序实现常见的用户效果的开发文档,更多小程序开发文档可以关注网站。
扫描二维码推送至手机访问。
版权声明:本文由子简科技发布,如需转载请注明出处。