uniapp添加顶部导航栏颜色渐变

在uniapp文件夹的pages.json文件中添加如下代码即可实现

"backgroundImage":"linear-gradient(to right, #FFDE28,#FF3228)"

{
    "path": "pages/mySuccessOrder/mySuccessOrder",
    "style": {
        "navigationBarTitleText": "支付",
        "app-plus": {
            "titleNView": {  
                "backgroundImage":"linear-gradient(to right, #FFDE28,#FF3228)"
            }  
        }
    }
}

结果:
uniapp添加顶部导航栏颜色渐变_第1张图片

你可能感兴趣的:(前端)