position-absolute导致层级错乱的原因是什么?

发布于 8 年前作者 gongjie2982 次浏览最后编辑 8 年前来自 issues

<view class=“position-absolute w-100 h-100 bg-white”>

<textarea>textarea</textarea>

<button open-type=“getUserInfo” >授权登陆</button>

</view>

<view class=“w-100 h-100 bg-white”>

主界面

<button>button1</button>

</view>

/**index.wxss**/

.position-absolute {

position: absolute;

}

.position-relative {

position: relative;

}

.w-100 {

width: 100%;

}

.h-100 {

height: 100%;

}

.bg-white {

background-color: white;

}

2 回复
xuchao
xuchao1 楼6 年前

你预期表现是什么?

position-relative

这个没用到,.position-absolute有什么用?

daixia
daixia2 楼6 年前