Skip to content

Instantly share code, notes, and snippets.

@joesteinkamp
Created August 19, 2012 17:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joesteinkamp/3396258 to your computer and use it in GitHub Desktop.
Save joesteinkamp/3396258 to your computer and use it in GitHub Desktop.
Linear Gradients: Cross Browser Syntax including Mobile
body {
background: #f06;
background: -webkit-gradient(linear, left top, left bottom, from(#f06), to(#ff0)); /* Saf4+, Chrome, iOS 3.2-4.3, Android 2.1-3 */
background: -webkit-linear-gradient(top, #f06, #ff0); /* Chrome 10+, Saf5.1+, iOS 5+, Android 4+ */
background: -moz-linear-gradient(top, #f06, #ff0); /* FF3.6+ */
background: -o-linear-gradient(top, #f06, #ff0); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #f06, #ff0); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f06', endColorstr='#ff0', GradientType=0); /* IE 5.5–7 */
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#f06', endColorstr='#ff0', GradientType=0)"; /* IE 8–9 */
background: linear-gradient(to bottom, #f06, #ff0); /* W3C */
}
/* IGNORE: CodePen only */
html { min-height: 100%; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment