小程序自定义导航栏

将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
posted @ 2018-10-20 23:21  金牛座的女孩  阅读(257)  评论(0编辑  收藏  举报