Created
May 20, 2013 19:33
-
-
Save dziudek/5614814 to your computer and use it in GitHub Desktop.
File icon in CSS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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%; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<div class="file"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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