当前位置:网站首页>Display effect of uniapp page title
Display effect of uniapp page title
2022-07-29 05:41:00 【Weisen】
One 、 Title display and no display
By default, the page displays the title , If the title is not displayed , Just add " navigationStyle":"custom "
"globalStyle": {
// The title at the top of the page shows
// "navigationStyle":"custom",
"navigationBarTextStyle": "white",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#ff0000",
"backgroundColor": "#0055ff"
}Two 、 Title Dynamic change display
You need to dynamically change the title of the page , Just add the following methods , Variable title The content in can be changed into dynamic variables from the back end , So as to realize the dynamic change of the title .
uni.setNavigationBarTitle({
title:"uniapp Study "
});3、 ... and 、 Title transparent gradient display effect
After sliding a certain distance on the page , The effect of gradient display of page title , Just in pages.json In file , Make the following configuration :
"pages": [ //pages The first item in the array represents the application startup page , Reference resources :https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": " The title shows ",
"app-plus":{
"bounce":"none" ,
"titleNView": {
"backgroundColor": "#ff0000",// Displayed background color
"type": "transparent" // Transparent gradient navigation bar
}
}
}
}
],The effect is as follows :

边栏推荐
- Clickhouse learning (VI) grammar optimization
- Day 3
- [electronic circuit] how to select ADC chip
- Li Kou 994: rotten orange (BFS)
- Flask 报错 RuntimeError: The session is unavailable because no secret key was set.
- B - identify floating point constant problems
- Detailed explanation of GPIO input and output
- Solve the problem that the prompt information of form verification does not disappear and the assignment does not take effect
- ClickHouse学习(一)ClickHouse?
- Fvuln-自动化web漏洞检测工具
猜你喜欢
随机推荐
Common characteristic engineering operations
uniapp组件之tab选项卡滑动切换
js深拷贝-笔记
个人学习笔记
[typescript] type reduction (including type protection) and type predicate in typescript
link与@import导入外部样式的区别
Abstract classes and interfaces
uniapp页面标题显示效果
Wechat applet - screen height
Pointer
小程序中的DOM对象元素块动态排序
弹性盒子相关知识
Day 2
ClickHouse学习(六)语法优化
ClickHouse学习(十)监控运行指标
Longest string without duplicate characters
Topological ordering of a graph of water
Relationship between link and @import
Similarities and differences between REM and PX and EM
The function of using wechat applet to scan code to log in to the PC web of the system









