weex在router里的页面中使用fixed全屏然后嵌套使用用absolute铺满,Android端右边下边出现白条;
<template>
<div class="wrapper">
<div class="cover"></div>
<div class="wrapper-cont">
<text>遮罩层</text>
</div>
</div>
</template>
<style scoped>
.wrapper{
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: 3;
}
.cover{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #111;
opacity: .5;
}
</style>
# 在这里通过路由进入上面的页面
<template>
<div>
<router-view></router-view>
</div>
</template>
路由页面中.wrapper
使用fixed全屏,然后在.wrapper
里面的div.cover
用absolute,left:0;right:0;top:0;bottom:0;
就会右边下边有白条,不能占满;
在web端iOS端正常,Android出现右边,下边有白条;有点像遮罩层像左上方整体偏移了一段
另外测试,不在router-view下引用.vue页面,.cover的写法就在三端都是全覆盖的,有遇到这个问题的大神没有?
试试换成
top: 0; left: 0; width: 750; height: 1334;