Skip to content

Instantly share code, notes, and snippets.

@Cyborg572
Created May 15, 2012 01:33
Show Gist options
  • Save Cyborg572/2698433 to your computer and use it in GitHub Desktop.
Save Cyborg572/2698433 to your computer and use it in GitHub Desktop.
Camera effect
/**
* Camera effect
*/
body{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
background-attachment: fixed;
background-size: 100px;
min-height: 100%;
}
#screen {
margin:550px 20px;
position: relative;
width: 100px;
height: 50px;
border: 1px solid black;
}
#screen::before{
content: "";
position: absolute;
top: 0; right: 0; bottom: 0; left: 0;
background: linear-gradient(45deg, #f06, yellow) repeat;
background-attachment: fixed;
background-size: 100px;
border: 1px solid blue;
transform: translate(100px, -50px) rotate(3deg) scale(2)
}
<!-- content to be placed inside <body>…</body> -->
<div id="screen"></div>
{"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