Created
January 31, 2014 00:26
-
-
Save LibertysYarn/8723081 to your computer and use it in GitHub Desktop.
Hexagons
From http://jtauber.github.io/articles/css-hexagon.html
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
.hex { | |
float: left; | |
margin-left: 3px; | |
margin-bottom: -26px; | |
} | |
.hex .top { | |
width: 0; | |
border-bottom: 30px solid #6C6; | |
border-left: 52px solid transparent; | |
border-right: 52px solid transparent; | |
} | |
.hex .middle { | |
width: 104px; | |
height: 60px; | |
background: #6C6; | |
} | |
.hex .bottom { | |
width: 0; | |
border-top: 30px solid #6C6; | |
border-left: 52px solid transparent; | |
border-right: 52px solid transparent; | |
} | |
.hex-row { | |
clear: left; | |
} | |
.hex-row.even { | |
margin-left: 53px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment