weex怎么实现定位

图片描述

效果图如图.
我想实现这样的效果, chrome预览的时候能看到的是正常的
但是在Weex Playground上 说明文字部分不显示 只显示一张图片.
问题:
是不是weex不支持定位吗?不支持的话有什么实现方法么? 谢谢
代码如下:

<template>
    <div class="wrapper">
        <div class="videoBox">
            <div class="videoText">
                <text style="color:#fff;font-size: 39px;">说明文字</text>
            </div>
            <image :src="img[0].videoUrl" class="videoInner" resize="cover"></image>
        </div>
    </div>
</template>

<style>
    .videoBox {
        /*display: flex;*/
        position: relative;
    }

    .videoInner {
        height: 450px;
        width: 750px;
    }

    .videoText {
        background: rgba(0,0,0,.4);
        height:100px;
        line-height:100px;
        width:750px;
        font-size: 32px;
        position: absolute;
        top:0;
        left:0;
        justify-content:center;
        align-items:center;
        z-index:10;
    }
    .videoText text{
        color:#fff;
        height:40px;
        width:750px;
        font-size:30px;
    }
</style>
阅读 4.3k
1 个回答

解决方法: weex 的css中不支持z-index 所以没有出现效果.换了下层级关系 解决
没仔细看文档的后果

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进