Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created October 21, 2013 18:26
Show Gist options
  • Save dziudek/7088542 to your computer and use it in GitHub Desktop.
Save dziudek/7088542 to your computer and use it in GitHub Desktop.
Curvy background
/**
* Curvy background
*/
#main {
transform: skewY(10deg);
overflow: hidden
}
#main:hover #bg {
background-position: 0 -100px;
}
#bg {
background: url('http://placekitten.com/800/600/') no-repeat;
background-size: cover;
height: 600px;
margin: -100px 0;
transform: skewY(-10deg);
transition: all .3s ease-out;
width: 100%;
}
<!-- content to be placed inside <body>…</body> -->
<div id="main"><div><div id="bg"></div></div></div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment