Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created May 20, 2013 19:33
Show Gist options
  • Save dziudek/5614814 to your computer and use it in GitHub Desktop.
Save dziudek/5614814 to your computer and use it in GitHub Desktop.
File icon in CSS
/**
* File icon in CSS
*/
.file {
background: #fa8;
border-radius: 10px 40px 10px 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, .4);
height: 200px;
margin: 0 auto;
overflow: hidden;
position: relative;
width: 150px;
}
.file:after {
background: #d86;
border-radius: 0 0 0 20px;
content: "";
height: 40px;
position: absolute;
right: 0;
top:0;
width: 40px;
}
.file:before {
background: #e97;
bottom: 0;
content: "";
height: 30px;
left: 0;
position: absolute;
transform: rotateZ(5deg) translateX(-10px);
transform-origin: 0% 50%;
width: 120%;
}
<!-- content to be placed inside <body>…</body> -->
<div class="file"></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment