这是基本布局的问题呀,用position: fixed;可以达到效果吧,反正点击跳回真的tabBar就好
<view class=“bottom-bar box”>
<view class=“bottom-bar-item” bindtap=“toTapbar” data-url=“index”>
<view class=“item-img”>
<image src="**"></image>
</view>
<view class=“item-text”>首页</view>
</view>
<view class=“bottom-bar-item” bindtap=“toTapbar” data-url=“public”>
<view class=“item-img”>
<image src="**"></image>
</view>
<view class=“item-text”>发布</view>
</view>
<view class=“bottom-bar-item” bindtap=“toTapbar” data-url=“myself”>
<view class=“item-img”>
<image src="**"></image>
</view>
<view class=“item-text”>我的</view>
</view>
</view>
.bottom-bar{
position: fixed;
bottom: 0;
left: 0;
padding: 5rpx 0 0;
background: #fff;
border-top: 1rpx solid #7A7E83;
}
.bottom-bar-item{
width: 250rpx;
text-align: center;
}
.item-img{
width: 100%;
}
.item-img image{
width: 52rpx;
height:52rpx;
vertical-align: middle;
}
.item-text{
font-size: 24rpx;
color: #7A7E83;
}
/*弹性盒模型*/
.box {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}