CSS blur and retain sharp edges using absolute div

前端 未结 3 2374
忘掉有多难
忘掉有多难 2021-02-19 05:58

This works just fine if img is not set to absolute:

div img {
    filter: blur(5px);
        -webkit-filter: blur(5px);
        -moz-filter: blur(5px);
        -         


        
3条回答
  •  没有蜡笔的小新
    2021-02-19 05:59

    I've noticed on mobile devices the blur sometimes will override the overflow:hidden. This can be fixed by adding a border: 1px solid transparent; to the container.

提交回复
热议问题