Created
July 7, 2014 06:16
-
-
Save hehongwei44/3b360d5578facf5f1332 to your computer and use it in GitHub Desktop.
为元素添加高斯模糊效果
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* @description:在相应的元素上添加blur的样式 | |
* 兼容性:ie6-9、最新版chrome. | |
* | |
*/ | |
.blur { | |
background: rgba(0,0,0,0.5); | |
-webkit-filter: blur(3px); | |
-moz-filter: blur(3px); | |
-o-filter: blur(3px); | |
-ms-filter: blur(3px); | |
filter: blur(3px); | |
filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius=3, MakeShadow=false); /* IE6~IE9 */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
通过svg canvas也能达到同样的效果。