我正在使用 nativescript 开发一个面向儿童的应用程序,我想制作一个带有图像背景的自定义操作栏,如下所示:
但是正如你所看到的,在滚动时,它显示了一个白色的矩形背景而不是透明的,我如何使用 Nativescript 布局来实现这一点?
这就是我正在做的:
<GridLayout rows="100,*">
<app-header row="0"></app-header> //This app header it's the custom component that holds just an image tag with the source.
<ScrollView row="1" orientation="vertical" class="page">
//Scrolling content...
</ScrollView>
</GridLayout>
您可以为 ActionBar 使用带有 alpha 的颜色。如果您为 ActionBar 使用不透明度属性,则子项也会受到影响。应用程序.css
ActionBar{
background-color: rgba(255, 0, 0, 0.0);
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句