Home >Web Front-end >CSS Tutorial >How to Achieve iOS 7\'s Blurred Overlay Effect with CSS?
Achieving iOS 7's Blurred Overlay Effect with CSS
Apple's iOS 7 introduced a distinct blurred overlay effect that extends beyond mere transparency. Developers often wonder how to replicate this appealing visual enhancement using web technologies.
CSS Solution
CSS 3 offers a straightforward method to achieve this effect:
<code class="css">#myDiv { -webkit-filter: blur(20px); -moz-filter: blur(20px); -o-filter: blur(20px); -ms-filter: blur(20px); filter: blur(20px); opacity: 0.4; }</code>
By adding this CSS code to an element, you can apply the blurred overlay effect. The 'blur()' filter sets the amount of blur applied, while 'opacity' controls the transparency of the element.
Practical Example
Here's a JSFiddle example that demonstrates this technique: https://jsfiddle.net/nwq9t/.
The above is the detailed content of How to Achieve iOS 7's Blurred Overlay Effect with CSS?. For more information, please follow other related articles on the PHP Chinese website!