Skip to content

Instantly share code, notes, and snippets.

@raul
Created May 14, 2011 08:59
Show Gist options
  • Select an option

  • Save raul/972054 to your computer and use it in GitHub Desktop.

Select an option

Save raul/972054 to your computer and use it in GitHub Desktop.
CSS3 gradient background in short page
<!doctype html>
<html lang=en>
<head>
<title>CSS3 gradient background in short page</title>
<meta charset=utf-8>
<style type="text/css" media="screen">
html{
height: 100%;
}
body{
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#A4FFAE), to(#5F774B)); /* Safari 4-5, Chrome 1-9 */
background: -webkit-linear-gradient(#A4FFAE, #5F774B) fixed; /* Safari 5.1+, Chrome 10+ */
background: -moz-linear-gradient(100% 100% 90deg, #A4FFAE, #5F774B);
background: -o-linear-gradient(#A4FFAE, #5F774B);
text-align: center;
}
h1, p{ width: 960px; margin: 0 auto;}
</style>
</head>
<body>
<h1>CSS3 gradient background in short page</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</body>
</html>
@marcelinollano

Copy link
Copy Markdown

Es un asco declarar todos esos gradient

@raul

raul commented May 16, 2011

Copy link
Copy Markdown
Author

Ah! Agreed, jajaja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment