Created
June 12, 2013 17:08
-
-
Save gcyrillus/5767212 to your computer and use it in GitHub Desktop.
hexagone backgound
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
/* hexagone backgound */ | |
.outer { | |
height:300px; | |
width:300px; | |
background:linear-gradient(45deg, white 13.5%, transparent 13.5%, transparent 85%, white 85%), | |
linear-gradient(-45deg, white 13.5%, red 13.5%,red 85%, white 85%) /* here replace red by background-color you whish*/; | |
text-align:center; | |
display:inline-table; | |
transition:1s; | |
} | |
.inner {display:table-cell;vertical-align:middle;} | |
.hexagon + .outer {background:linear-gradient(70deg, white 13.5%, transparent 13.5%, transparent 85%, white 85%), | |
linear-gradient(-70deg, white 13.5%, green 13.5%,green 85%, white 85%) /* here replace red by background-color you whish*/; | |
width:150px | |
} | |
.outer:hover {width:1400px; transition:2s; |
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
<div class="hexagon outer"> | |
<div class="hexagon inner"> | |
hexa, gone or not ?<br/> | |
needs to be a square not to go ? | |
<br/>Hover me | |
</div> | |
</div> | |
<div class="hexagon outer"> | |
<div class="hexagon inner"> | |
hexa, gone or not ?<br/>Hover me | |
</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
// 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":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment