Skip to content

Instantly share code, notes, and snippets.

@StuPig
Created May 21, 2014 06:07
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 StuPig/b118e522e824cc3f335d to your computer and use it in GitHub Desktop.
Save StuPig/b118e522e824cc3f335d to your computer and use it in GitHub Desktop.
*{margin:0;padding:0;}
.grid {
padding: 600px 0;
background-repeat: repeat-y;
background-size: 1px auto;
}
@media screen and (max-width:480px) {
.grid {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc)), -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc));
background-position:33% 0,66% 0;
}
}
@media screen and (min-width:480px) and (max-width:640px) {
.grid {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc)),
-webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc)),
-webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc));
background-position:25% 0,50% 0,75% 0;
}
}
@media screen and (min-width:640px) {
.grid {
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc)),
-webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc)),
-webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc)),
-webkit-gradient(linear, 0 0, 0 100%, from(#ccc), to(#ccc));
background-position:20% 0,40% 0,60% 0,80% 0;
}
}
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="net grid" />
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div class="grid"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment