我对图像有问题。我试图模糊图像的一部分,但我的解决方案无效。 请看看下面的代码:使用CSS模糊图像的一部分
HTML文件
<div id="image">
<div class="blur"></div>
</div>
CSS文件
#image {
width: 940px;
height: 360px;
background-image: url('../img/photo.png');
}
#image .blur {
background-image: url('../img/photo.png');
background-position: center right;
-webkit-filter: blur(3px);
-moz-filter: blur(3px);
-o-filter: blur(3px);
-ms-filter: blur(3px);
filter: blur(3px);
filter: blur(3px);
float: right;
height: 100%;
width: 360px;
}
它看起来就像这样:http://img.pl/THng.png。它超越了形象。我想创建这样的尖锐轮廓:http://img.pl/VHng.png。
这是可能的CSS?
你可能会找到答案[这里](http://stackoverflow.com/questions/12224320/defined-edges-with-css3-filter-blur)或者[这里](HTTP:// stackoverflow.com/questions/17212984/how-to-have-an-image-with-css-filterblur-and-sharp-edges)。 – 2014-10-08 19:57:06
我会说,@卡伦的回答比较好。我可以重现哈森姆的问题,但没有简单的解决方法。你应该接受他的回答,然后我删除我的回答。 – Boldewyn 2014-10-09 07:42:19