Skip to content

Instantly share code, notes, and snippets.

@Hibrix-net
Last active April 11, 2020 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hibrix-net/6113f136184237822a2a2116266068d9 to your computer and use it in GitHub Desktop.
Save Hibrix-net/6113f136184237822a2a2116266068d9 to your computer and use it in GitHub Desktop.
Cross-browser linear gradients & opacity filters (CSS)
gradient {
background: linear-gradient(to top, #DF6210 0%, #F99A5A 100%) repeat scroll 0 0 rgba(0, 0, 0, 0); /* W3C */
background: -moz-linear-gradient(top, #F99A5A 0%,#DF6210 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#DF6210), color-stop(100%,#F99A5A)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #F99A5A 0%,#DF6210 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #F99A5A 0%,#DF6210 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #F99A5A 0%,#DF6210 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#F99A5A', endColorstr='#DF6210',GradientType=0 ); /* IE6-9 */
}
opacity {
opacity: 0.8; /* W3C */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; /* IE8 */
-khtml-opacity: 0.8; /* Safari 1.x */
filter: alpha(opacity=80); /* IE 5-7 */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment