coderef

filterBaseline · Widely available

The filter CSS property applies one or more graphic effects to an element. You can use filter functions, such as blur() and drop-shadow(), alone or combined to produce different effects. For instance, filter: blur(2px).

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 7, 2016. Widely available since Mar 7, 2019.

Browser support

DesktopChrome
1–52Not supported
53+Supportedsince Aug 31, 2016
Current: 155
Edge
12+Supportedsince Jul 29, 2015
Current: 154
Firefox
1–34Not supported
35+Supportedsince Jan 13, 2015
Current: 157
Safari
1–9Not supported
9.1+Supportedsince Mar 21, 2016
Current: 27
MobileChrome Android
18–52Not supported
53+Supportedsince Sep 7, 2016
Current: 155
Firefox Android
4–34Not supported
35+Supportedsince Jan 13, 2015
Current: 157
Safari iOS
1–9Not supported
9.3+Supportedsince Mar 21, 2016
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: filter.

Feature detection

CSS · check before using
@supports (filter: initial) {
  /* styles that rely on filter */
}

/* or in JavaScript */
if (CSS.supports("filter", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (22). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
filter5312359.153359.3
filter.blur5312359.153359.3
filter.brightness5312359.153359.3
filter.contrast5312359.153359.3
filter.drop-shadow5312359.153359.3
filter.grayscale5312359.153359.3
filter.hue-rotate5312359.153359.3
filter.invert5312359.153359.3
filter.opacity5312359.153359.3
filter.saturate5312359.153359.3
filter.sepia5312359.153359.3
<filter-function>181235653356
<filter-function>.blur181235653356
<filter-function>.brightness181235653356
<filter-function>.contrast181235653356
<filter-function>.drop-shadow181235653356
<filter-function>.grayscale181235653356
<filter-function>.hue-rotate181235653356
<filter-function>.invert181235653356
<filter-function>.opacity181235653356
Show 2 more
Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
<filter-function>.saturate181235653356
<filter-function>.sepia181235653356