小程序自定义导航栏

时间:2018-10-21 01:00:15   收藏:0   阅读:383

将app.json里的navigationStyle设置为navigationStyle:custom。可以在.wxss里通过margin和padding来自定义导航栏。

例如在.wxml里写
<view class="nav">我是汽车维修技师</view>
在.wxss里设置样式
.nav{height:90rpx;line-height: 90rpx;margin-top:60rpx;padding-left:20rpx;font-size:28rpx;font-weight:400}
学习链接:
https://developers.weixin.qq.com/miniprogram/dev/framework/config.html#全局配置
https://www.caiyunyi.com/news/blog/25.html
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!