小程序wxss显示底部居中如何控制
<view class='content'>
<text style="display: block;text-align: center;font-size: 30px;">
倒计时:\n{{ticker}}
text>
view>
<button class='btn' bindtap='tapChange'>点击button>
wxss
.content{
font-family: 微软雅黑;
color: white;
bottom:47px;
padding:0px;
margin:0px;
position:absolute;
text-align: center;
}
.btn{
width:100%;
border-radius: 3px;
padding-top:2px;
font-size:14px;
background-color:#CC3333;
color:white;
overflow:hidden;
height:45px;
bottom: 0;
position: fixed;
}
要给absolute的元素加width:100%
.content{
width:100%;
font-family: 微软雅黑;
.content{
display: flex;
justify-content: center;
}
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!