Created
May 28, 2013 19:07
-
-
Save markmichon/5665267 to your computer and use it in GitHub Desktop.
A CodePen by Mark Michon. Rotated Squares
This file contains 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
<div class="logo"> | |
<div class="pencil"></div> | |
</div> |
This file contains 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
@import "compass"; | |
body { | |
padding: 50px; | |
} | |
.logo { | |
display: block; | |
width: 100px; | |
height: 100px; | |
background-color: #facade; | |
position: relative; | |
transform: rotate(-45deg); | |
} | |
.logo:before { | |
content: ''; | |
position: absolute; | |
width: 100px; | |
height: 100px; | |
background-color: red; | |
display: block; | |
left:50px; | |
top:50px; | |
z-index:2; | |
} | |
.logo:after { | |
content: ''; | |
position: absolute; | |
width: 50px; | |
height: 50px; | |
background-color: white; | |
display: block; | |
left:50px; | |
top:50px; | |
z-index:4; | |
} | |
.pencil { | |
width:0; | |
height:0; | |
position: absolute; | |
border:20px solid transparent; | |
border-left: 20px solid black; | |
transform: rotate(45deg); | |
left: 80px; | |
top: 80px; | |
z-index: 5; | |
border-radius: 20px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment