我有这段 CSS(跨浏览器):
#theimg {
filter: blur(0px);
animation: fadein 6s ease 0 1;
/* Safari and Chrome: */
-webkit-filter: blur(0px);
-webkit-animation: fadein 6s ease 0 1;
}
@keyframes fadein {
from {
-webkit-filter: blur(10px);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
-moz-opacity: 0;
opacity: 0;
}
to {
-webkit-filter: blur(0px);
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
filter: alpha(opacity=100);
-moz-opacity: 1;
opacity: 1;
}
}
@-webkit-keyframes fadein { /* Safari and Chrome: */
from {
-webkit-filter: blur(10px);
-khtml-opacity: 0;
opacity: 0;
}
to {
-webkit-filter: blur(0px);
-khtml-opacity: 1;
opacity: 1;
}
}
它可以跨浏览器工作(除了模糊......)。但是,在 Google Chrome 中,图像会淡入,但不会同时去模糊。如果我排除淡入,它将去模糊。
我怎样才能解决这个问题?