不同手机,小程序显示不一样,这是小程序bug还是我的代码有问题?
发布于 5 年前 作者 dingna 15271 次浏览 来自 问答

在其它手机上都正常,但是在华为mate8和iPhone6plus显示不正常,iPhone6plus正常的应该如下:

但是在iPhone6plus显示如下:

内页,华为正常显示应该如下:

但是在华为mate8(图片不是同一张,但是看效果就行了)显示如下(图片、文字都被放大了):

10 回复

/**index.wxss**/

swiper{

width:750rpx;

height:400rpx;

}

.service{

margin-top:30rpx;

}

.service-title{

width:200rpx;

margin-left:300rpx;

}

.service-menu{

margin-top:20rpx;

display:flex;

flex-direction:row;

flex-wrap:wrap;

justify-content:space-between;

}

.service-item{

width:180rpx;

height:240rpx;

}

.service-item image{

width:90rpx;

height:90rpx;

padding:0rpx 40rpx;

}

.service-item text{

width:100%;

padding:0rpx 35rpx;

margin-top:20rpx;

font-size:25rpx;

}

.our-works{

width:100%;

height:500rpx;

background-color:#303030;

margin-top:-20rpx;

display:flex;

flex-direction:row;

flex-wrap:wrap;

justify-content:center;

align-content:flex-start;

}

.our-works-title{

width:100%;

font-size:35rpx;

color:white;

text-align:center;

margin-top:40rpx;

padding-bottom:20rpx;

}

.our-works-item{

width:30%;

height:30%;

margin-left:10rpx;

margin-right:10rpx;

margin-top:20rpx;

}

.our-works-item image{

width:100%;

height:100%;

}

.news-list{

margin-top:60rpx;

display:flex;

flex-wrap:wrap;

justify-content:space-between;

}

.news-header{

width:100%;

text-align:center;

}

.news-item{

width:330rpx;

height:120rpx;

margin:20rpx;

}

.news-date{

width:100%;

color:red;

/* margin:0rpx 120rpx; */

text-align:center;

}

.news-summary{

width:100%;

height:100rpx;

color:gray;

font-size:25rpx;

margin-top:10rpx;

text-align:center;

line-height:40rpx;

}

.more{

width:100%;

margin-bottom:40rpx;

text-align:center;

font-size:30rpx;

line-height:60rpx;

color:gray;

}

现在遗留的问题是什么,再清晰描述一下。

还有你们是不是用了很多rpx去布局?

@raphealguo 

wxml审核不通过

不建议这样过多的使用 rpx。

你好,这是一个已知的bug,请尝试在开发者工具编译之后在上传提审发布一次。如还有问题,在此贴告知at我一下

rpx 不是标准用法吗?如果不是的话,怎么抉择用不用rpx,有什么可以参考的文档或者标准吗?

@raphealguo 

还有就是在其他品牌手机和其他型号苹果手机上没问题,iPhone6Plus就不正常

@raphealguo 

@raphealguo 

wxml 审核不通过

请贴一下对应的 wxml+wxss 看样子不是rpx放大问题 是你的样式写得有问题

iPhone6Plus 小程序排版错乱,其他的都正常,参考前两张图片

@raphealguo 

回到顶部