When using both webkit filters "blur" and "invert", only blur works. And if "blur" is removed "invert" works.
Also only Chrome and Opera are responding to the code.
Is there a way to make this work for recent IE and Firefox versions?
body {
-webkit-filter: invert(100%);
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
You could use
svg'sforeignObjectelement to import the entirebody's content into ansvgelement and then apply thefilters on theforeignObjectwhich will apply thefilters on the entirebody.Browser support for
svgfilters vs CSS filters.Demo on CodePen
If you want to apply the
filteron an event, you could remove thefilterattribute from theforeignObjectelement initially and apply thefilterusing JavaScript this way.