-
-
Save Thomas101/3736215 to your computer and use it in GitHub Desktop.
Fade out elements on WebKit and Firefox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This version works in all browsers including ie6+