codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

How to create iOS Backdrop effect

Fanny-Elise Patrikainen
codeburst
Published in
6 min readJul 30, 2017

--

The Three Graces (Raphael)
-webkit-backdrop-filter: blur(10px);

1. Backdrop filter on a fixed body background:

2. Backdrop on any selected element:

a. Backdrop on the side of an element (on top, bottom, etc):

.elementB {transform: translateY(-30%)}.elementB::before {transform: translateY(-70%)}
.elementB {transform: translateY(-70%)}.elementB::before {transform: translateY(70%)}

b. Backdrop of any shape — svg only solution

Photo credit: https://unsplash.com/photos/G69vIksRqWA
<defs><pattern id=”Pattern” width=”100%” height=”100%” x=”0" y=”0" patternUnits=”userSpaceOnUse”><image width=”100%” height=”100%” y=”-2" xlink:href=”tomme.png” patternUnits=”userSpaceOnUse”></image></pattern></defs><rect class=”background_rect” x=”0" y=”0" width=”100%” height=”100%” stroke=”rgba(250,250,250,0.3)” stroke-width=”0.1px” fill=”url(#Pattern)”></rect>
<defs><filter id=”blurFilter” x=”0" y=”0"><feGaussianBlur stdDeviation=”0.5"></feGaussianBlur></filter><pattern id=”blurPattern” width=”100%” height=”100%” x=”0" y=”0" patternUnits=”userSpaceOnUse”><image width=”100%” height=”100%” y=”-2" xlink:href=”tomme.png” filter=”url(#blurFilter)”></image></pattern></defs><rect class=”overlay_rect” x=”12" y=”5" width=”35%” height=”83%” fill=”url(blurPattern)” rx=”1" ry=”1"></rect>

c. Backdrop on videos (!) :

3. Dynamic backdrop effect:

Conclusion :

--

--

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Responses (1)