【问题标题】:Nativescript CSS Text In front of image图片前面的 Nativescript CSS 文本
【发布时间】:2016-09-07 01:48:51
【问题描述】:

如何创建 CSS 以在图像前面制作位置标签。就像 HTML 上的 z-index 一样。我正在使用背景图像,但没有工作。 我是用这段代码创建的:

<grid-layout rows="220, auto" columns="*, *, *" id="cardReport" style="background-image: url('{{ foto }}');">
    <image src="{{ foto }}" stretch="aspectFill" colSpan="3" row="0" tap="goReport"/>
    <label text="{{ namapaket }}" class="info" textWrap="true" row="1" colSpan="1"
           horizontalAlignment="center"/>
</grid-layout>

感谢您的帮助。

【问题讨论】:

    标签: android css mobile nativescript


    【解决方案1】:

    将标签与图片放在同一行。

    <grid-layout rows="220, auto" columns="*, *, *" id="cardReport" style="background-image: url('{{ foto }}');">
    <image src="{{ foto }}" stretch="aspectFill" colSpan="3" row="0" tap="goReport"/>
    <label text="{{ namapaket }}" class="info" textWrap="true" row="0" colSpan="1"
           horizontalAlignment="center"/>
    

    【讨论】:

    • 有效。谢谢@bradMartin
    猜你喜欢
    • 1970-01-01
    • 2019-09-14
    • 1970-01-01
    • 1970-01-01
    • 2022-01-20
    • 2015-05-16
    • 1970-01-01
    • 1970-01-01
    • 2015-06-03
    相关资源
    最近更新 更多