Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fade out elements on WebKit and Firefox
<style>
#content {
background: #d0d0d0;
height: 100px;
width: 500px;
position: absolute;
top: 0px;
left: 0px;
}
#mask {
position: absolute;
top: 0px;
left: 0px;
height: 100px;
width: 600px;
//http://www.colorzilla.com/gradient-editor/
background: transparent; /* Old browsers */
background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255, 255, 255, 0)), color-stop(100%,rgba(255, 255, 255, 1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%,rgba(255, 255, 255, 1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%,rgba(255, 255, 255, 1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%,rgba(255, 255, 255, 1) 100%); /* IE10+ */
background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%,rgba(255, 255, 255, 1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00FFFFFF', endColorstr='#FFFFFFFF',GradientType=1 );
}
</style>
<div id="content">
Bacon ipsum dolor sit amet pig capicola flank drumstick tri-tip cow pork. Tenderloin pork belly ham cow chuck strip steak andouille fatback beef ribs. Tongue jowl pig chicken flank drumstick pancetta strip steak capicola biltong. Swine jowl beef ribs filet mignon spare
</div>
<div id="mask"></div>
@Thomas101

This comment has been minimized.

Copy link
Owner Author

Thomas101 commented Sep 17, 2012

This version works in all browsers including ie6+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.