The filter
CSS property applies graphical effects like blur or color shift to an element.
Currently only the grayscale
and blur
functions are supported.
If you use opacity
, you can directly set properties for the view, link
Views with the grayscale
attribute added on Android will create off-screen buffer on the GPU. A large number of off-screen buffer will cause rendering performance to decrease. It is recommended to replace filter: grayscale(0)
with filter: none
to remove off-screen caching when grayscale is not needed.
When using blur, you can add blur-sampling
property (an int value) to the node to set the downsampling ratio to improve performance.
Setting the blur area may cause performance issues if content is updated all the time.
For higher blur efficiency, it is recommended that the actual size of the blur-radius should not exceed 25, that is, the maximum write 25ppx or 25/density px.
Initial value | none |
Applies to | all elements |
Inherited | no |
Animatable | yes |
Different number of functions supported
LCD tables only load in the browser