.headBox{
position: relative;
}
.headImg{
width: 100px;
border-radius: 10px;
position: absolute;
z-index: 99;
}
.headImgBg{
z-index: -99;
/*position: absolute;*/
width: 100px;
border-radius: 10px;
-webkit-filter: blur(2px); /* Chrome, Safari, Opera */
filter: blur(2px);
}<a class="headBox" href="javascript:" >
<img class="headImg" src="dgimages/dige1.png" alt="ZhangDi(张迪)">
<img class="headImgBg" src="dgimages/dige1.png" >
</a>
本文介绍了一种使用CSS实现的头像模糊背景效果,通过绝对定位和滤镜属性来达到美观的视觉展示效果。文章展示了如何利用CSS的blur滤镜为头像图片创建一个柔和的背景副本。
151

被折叠的 条评论
为什么被折叠?



