
.icon3{
display: flex;
align-items: center;
justify-content: center;
width: 100px;
height: 100px;
/* margin-left: -8%; */
margin-top: 150rpx;
border-radius: 500px;
float: left;
}
.shuxian{
width: 8px;
height: 200px;
float: left;
margin-left: 40rpx;
margin-top: 40rpx;
}
.ziti1{
color: black;
font-size: large;
margin-left: 30rpx;
margin-top: 20rpx;
float: left;
}
上班时间 8:30
这是代码,想实现“上班打卡”这个按钮水平居中,但是一直没有效果
微信小程序开发问题解答
微信小程序开发者回答:
按钮外面套一个view,
width:750rpx,
position:relative,
display:flex,
justify-content: center,
微信小程序开发者回答:
.icon3{
position: absolute;
top: 150rpx;
left: 0;
right: 0;
bottom: 0;
width: 100px;
height: 100px;
border-radius: 50%;
}这样可好?

微信小程序开发者回答:
你试一下line-height呢,给100试试
本文网址:http://www.91bianli.com/weixinxiaochengxu/15120.html