4993关注15664浏览
对cover-view 和 cover-image, 在同一级中设置 position:absolute, 在ios小程序真机中z-index是无效的
比如:
<cover-view class="rob-mid-bg">cover1</cover-view>
<cover-view class="rob-last-bg">cover2</cover-view>
.rob-mid-bg{
position: absolute;
z-index: 50;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 159rpx;
height: 159rpx;
background-color:#ff9a00;
border-radius: 9999rpx;
animation: showornot 2s linear 0s infinite;
}
.rob-last-bg{
position: absolute;
z-index: 10;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
width: 180rpx;
height: 180rpx;
background-color: #78694e;
border-radius: 9999rpx;
transform-origin: center;
animation: showornot 1.5s linear 0s infinite;
}
以上代码 ,在模拟器和安卓机中都是好的,但 在ios小程序真机中,cover1永远被cover2覆盖,除非把cover1放到cove2下面,才能覆盖cover2
<cover-view class="rob-last-bg">cover2</cover-view>
<cover-view class="rob-mid-bg">cover1</cover-view>
之前也发过一个cover-view的问题,一直没有回复... 现在又发现一个
-
至过去的我
2044人对此回答表示赞同
我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>