Skip to content

Instantly share code, notes, and snippets.

@dziudek
Created May 16, 2012 11:30
Show Gist options
  • Select an option

  • Save dziudek/2709690 to your computer and use it in GitHub Desktop.

Select an option

Save dziudek/2709690 to your computer and use it in GitHub Desktop.
Hex image
/**
* Hex image
*/
body {
background: url('http://subtlepatterns.com/patterns/gridme.png');
}
.hex {
height: 448px;
width: 360px;
transform: rotateZ(-35deg);
margin: 60px 85px;
overflow: hidden;
}
.hex > div {
height: 448px;
width: 360px;
transform: rotateZ(69deg);
margin-left: -5px;
margin-top: -3px;
overflow: hidden;
}
.hex img {
display: block;
height: 340px;
width: 440px;
transform: rotateZ(-34deg);
margin-top: 40px;
margin-left: -25px;
}
<div class="hex">
<div>
<img src="http://placekitten.com/200/200" />
</div>
</div>
{"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