Home > Article > Web Front-end > How to Prevent Blur Effect from Extending to Child Elements in CSS?
Cancel Blur Effect on Child Elements
You have a
Create a separate
HTML:
<code class="html"><div class="content"> <div class="overlay"></div> <div class="opacity"> <div class="image"> <img src="images/zwemmen.png" alt="" /> </div> <div class="info"> a div wih all sort of information </div> </div> </div></code>
CSS:
<code class="css">.content { float: left; width: 100%; } .content .overlay { background-image: url('images/zwemmen.png'); height: 501px; -webkit-filter: blur(3px); -moz-filter: blur(3px); -o-filter: blur(3px); -ms-filter: blur(3px); filter: blur(3px); z-index: 0; } .opacity { background-color: rgba(5, 98, 127, 0.9); height: 100%; overflow: hidden; position: relative; z-index: 10; }</code>
This will create a
The above is the detailed content of How to Prevent Blur Effect from Extending to Child Elements in CSS?. For more information, please follow other related articles on the PHP Chinese website!