1 页面底部添加固定位置按钮

.wxml:
<button class='Scancode' bindtap='getScancode'>底部位置固定</button>
.wxss:
.Scancode{
font-size: 39rpx;
background: #eee;
position: fixed;
bottom: 110rpx;
display: flex;
width: 100%;
justify-content: center;
}
2 获取微信头像的界面,默认生成一个新项目的默认界面就有,我想要修改头像和名称的样式,想并列展示,发现float:left没有效果,查询了下发现只需要将flex-direction: column 改为row即可:

.wxss:
.userinfo {
display: flex;
flex-direction: row;
/* align-items: center; */
background:rgb(245, 73, 73);
}
网友评论