image上显示文字,iPhone上无效
发布于 5 年前 作者 gangfang 2613 次浏览 来自 问答

我在image上加文字text,在andorid手机上没问题,在iphone上就看不到文字了,文字被图片覆盖住了,怎么处理

2 回复

你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

微信版本是6.6.3好像;手机是iphoneX。关键是在android上可以显示图片上的文字;在这个iphone上无法显示图片上的文字。图片可以显示,文字显示不了。在别的iphone上可以显示,就是这个iphone上显示不出来.

如果是微信版本太低,是不是有点尴尬,因为写的是css

<view class=‘content’>

    <image></image>

    <text class=‘img-text’></text>

</view>

.contentlist .content{

    width: 30%;

    display: flex;

    flex-direction: column;

    align-items: center;

    position: relative;

}

.contentlist .content image{

    width: 100%;

    height: 60px;

    z-index: 1;

}

.contentlist .content .img-text{

    position: absolute;

    z-index: 99;

    text-align: center;

    top:50;

    color: white;

}

回到顶部