小程序
小游戏
企业微信
微信支付
扫描小程序码分享
有没有办法让不是tabBar 中的页面也显示出tabBar呢?
4 个回答
加粗
标红
插入代码
插入链接
插入图片
上传视频
如果自己写的话 非tabbar页面的 tabbar的高度是怎么确定的
你好,麻烦通过点击下方“反馈信息”按钮,提供出现问题的。
这是基本布局的问题呀,用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 class="bottom-bar-item" bindtap="toTapbar" data-url="public">
<view class="item-text">发布</view>
<view class="bottom-bar-item" bindtap="toTapbar" data-url="myself">
<view class="item-text">我的</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;
如果自己写要怎么保证view一直浮动在最底部呢?
这个是不行的,tabBar的页面一定要在app.json配置好。但是其他页面一定要,你可以自己写一个跟tabBar一样的样式啊
关注后,可在微信内接收相应的重要提醒。
请使用微信扫描二维码关注 “微信开放社区” 公众号
如果自己写的话 非tabbar页面的 tabbar的高度是怎么确定的
这是基本布局的问题呀,用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;
}
如果自己写要怎么保证view一直浮动在最底部呢?
这个是不行的,tabBar的页面一定要在app.json配置好。但是其他页面一定要,你可以自己写一个跟tabBar一样的样式啊