我想让标签栏透明,操作栏在滑动布局或页面上透明。操作栏或选项卡栏必须位于页面顶部,就像两层一样
我尝试过使用 css 使其透明,但它在页面上并没有变得透明。
<ActionBar title="Name" backgroundColor="#00000000"></ActionBar>
<TabView androidTabsPosition="bottom" selectedTabTextColor="white">
<page-router-outlet
*tabItem="{iconSource: getIconSource('test')}"
name="homeTab">
</page-router-outlet>
<page-router-outlet
*tabItem="{iconSource: getIconSource('test2')}"
name="locationTab">
</page-router-outlet>
<page-router-outlet
*tabItem="{iconSource: getIconSource('test3')}"
name="searchTab">
</page-router-outlet>
</TabView>
页面上的透明操作栏
Example https://i.stack.imgur.com/r15in.jpg
使用您选择的背景图像或颜色设置页面/根布局的样式
.page {
background: url(https://cdn.pixabay.com/photo/2017/08/12/10/13/background-2633962__340.jpg);
background-repeat: no-repeat;
background-size: cover;
}
Android
iOS
Adjust ActionBar
属性基于loaded
event
onActionBarLoaded(event: EventData) {
const actionBar = <ActionBar>event.object;
if (actionBar.ios) {
(<any>actionBar).updateFlatness = function (navBar) {
actionBar.ios.setBackgroundImageForBarMetrics(UIImage.new(), UIBarMetrics.Default);
actionBar.ios.translucent = true;
};
}
}
(针对 v5.x 验证兼容性)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)