Experiment: create a shape that blurs web page underneath it
Use SVG filter to create a shape that blurs web page underneath it, as on this demo video.
Based on the implementation described at:
https://www.sitepoint.com/design-tricks-with-svg-filters-a-masked-blur-effect/
Uses external SVG image as a shape, because of Firefox’s problems with using local SVG fragment:
https://bugzilla.mozilla.org/show_bug.cgi?id=455986
It seems to work on latest versions of Chrome and Firefox, but it does not work in IE or Edge:
https://caniuse.com/#search=svg-html
Microsoft does not seem to be interested in supporting SVG filters for CSS:
https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/6618695/
backdrop-filter
For IE and Edge, one could try to create “overlay” element with shape and CSS backdrop-filter
applied:
https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter
But that’s completely different implementation.
Too bad SVG’s enable-background
is deprecated, and only IE and Edge implement it anyway (probably that is why they already have backdrop-filter
done).
It is possible to re-render parts of web page in a Canvas, using one of:
That allows to apply any effects one can imagine, but has some limitations:
text-shadow
This cool trick was thought about by Greg.
SPAN
s or other type of elements,text-shadow
on themThis may be made to look almost like real blur effect, but may be too slow to apply dynamically.