nui-app头部自定义导航栏

/*导航栏*/
.header {
    margin: 30upx 0;
}

.tit {
    font-size: 34upx;
    font-weight: bold;
}

.index {
    flex: 1;
    flex-direction: column;
    background-image: linear-gradient(200deg, #3d6d98 0%, #68ad96 100%);
    color: #fff;
    text-align: center;
    padding: 30upx 0;
    position: relative;
}

.status_bar {
    height: var(--status-bar-height);
    width: 100%;
}

.top_view {
    height: var(--status-bar-height);
    width: 100%;
    position: fixed;
    top: 0;
}

.content {
    justify-content: center;
    align-items: center;
}

.index_box {
    display: flex;
    flex-direction: row;
    align-items: center;
}

/*导航栏*/

 

pages.json里面的写法:

{
            "path": "pages/index/index",
            "style": {
                "navigationBarTitleText": "平台",
                "navigationStyle": "custom",
                "app-plus": {
                    "titleNView": false
                }
            }
        },

你可能感兴趣的:(uni-app)