到目前为止,我发现的唯一方法是使用 css。
<fa-image-surface class="{{blurClass}}" fa-image-url="coolimage.png" fa-size="[640,320]" fa-click="imageClick()">
</fa-image-surface>
在控制器中
$scope.blurClass = "blur-in"; // start with no blur
$scope.imageClick = function() {
$scope.blurClass = "blur-out"; // animate to a blur
}
在 .css 中
.blur-out {
-webkit-filter: blur(8px);
-webkit-transition: all 0.1s ease-out;
transition: all 0.1s ease-out;
}
.blur-in {
-webkit-filter: blur(0px);
-webkit-transition: all 0.1s ease-in;
transition: all 0.1s ease-in;
}