Stop CSS Opacity From Affecting Child Elements


/ Published in: CSS
Save to your folder(s)

By default, applying opacity to an HTML element will make all of it's child elements (the content inside of the object) to also get the opacity style applied to it. Here's a clever example of how to override that rendering output in browsers.

The solution is to create a wrapper and apply absolute positioning to a child element of the wrapper.

URL: http://www.impressivewebs.com/demo-files/css-opacity/css-opacity-demo.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.