filter导致overflow:hidden失效
发布于 6 年前 作者 wangna 3413 次浏览 来自 问答

案例代码如下:

<view style="width:200px;height:200px;background:yellow;border:1px solid red;border-radius:100px;overflow:hidden">
    <image src="//file2.ih5.cn/v35/files/4365223bd2a03ce8ba2fd5f5f7e9407d_46504_500_500.jpg" style="width:200px;height:200px;"/>
  </view>
<view style="width:200px;height:200px;background:yellow;border:1px solid red;border-radius:100px;overflow:hidden;filter:brightness(0.88)">
    <image src="//file2.ih5.cn/v35/files/4365223bd2a03ce8ba2fd5f5f7e9407d_46504_500_500.jpg" style="width:200px;height:200px;"/>
</view>

下边的view只是比上边的多了个filter属性,导致下边view的overflow属性失效,下边是效果对比图:

1 回复

这个锅。。怎么说呢。。我记得是 chromium 的bug。。。别用在一层。。

回到顶部