Created
May 12, 2012 07:28
-
-
Save dziudek/2664965 to your computer and use it in GitHub Desktop.
Image styling - octagon method 1.
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
/** | |
* Image styling - octagon method 1. | |
*/ | |
.row { | |
display: block; | |
clear: both; | |
} | |
.img { | |
border: none; | |
float:left; | |
height: 160px; | |
margin: 0 75px 0 0; | |
transform: rotateZ(45deg); | |
width: 160px; | |
overflow:hidden; | |
position: relative; | |
} | |
.img > div { | |
background: #faa; | |
height: 160px; | |
transform: rotateZ(-45deg); | |
width: 160px; | |
} | |
.img > div:hover { | |
background: #afa; | |
} | |
.row2 > div { | |
margin-bottom: -40px; | |
margin-top: -40px; | |
} | |
.row2 > div:first-child { | |
margin-left: 118px; | |
} |
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="row row1"> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
</div> | |
<div class="row row2"> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
</div> | |
<div class="row row1"> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
<div class="img"><div>IMG</div></div> | |
</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
{"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