overflow: hidden; 在模拟器中正常,在真机中失效?
发布于 5 年前 作者 fangfu 807 次浏览 来自 官方Issues

wxml:

<view class=“image-box”>

<cover-image src=https://images.unsplash.com/photo-1551334787-21e6bd3ab135?w=640”></cover-image>

</view>

wxss:

.image-box {

border-radius: 50px;

overflow: hidden;

width: 156rpx;

height: 156rpx;

border: 1px solid red;

}

以上代码在模拟器中可以实现超出隐藏,但是在真机中无法超出隐藏;

网上提供的改变层级顺序也试过了,但是没有解决,求大神帮忙

1 回复

直接用image标签就可以了

回到顶部