Created
December 19, 2012 11:07
-
-
Save pehaa/4335980 to your computer and use it in GitHub Desktop.
220 = 110x2, (190-220)/2 -110
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
body {padding-top:100px} | |
.honey {display:block; background:yellow url(http://lorempixel.com/300/300/) | |
center center; | |
height:110px; width:190px;margin-right:10px;margin-bottom:65px; | |
float:left; position:relative} | |
.clear {clear:left; margin-left:100px;} | |
.left ,.right {display:block; background:inherit; | |
width:100%; height:100%; position:absolute;overflow:hidden; left:0; top:0; z-index:-1} | |
.left {transform:rotate(-60deg); background:inherit } | |
.right:after,.left:after {content:""; position:absolute;background:inherit; | |
/* 220 = 110x2, (190-220)/2 -110 */ | |
width:220px; height:220px; display:block; left:0;top:0; | |
transform:rotate(-60deg) translate(-110px,0px); transform-origin:top left} | |
.left:after {transform:rotate(60deg) translate(-15px,-165px);} | |
.right {transform:rotate(60deg); background:inherit ; } | |
.honey:hover {background:orange} | |
.honey p {color:#FFF; text-align:center; line-height:110px;padding:0; | |
margin:0; font-size:24px; font-family:arial narrow; | |
text-transform:uppercase; opacity:0; transition:.5s} | |
.honey:hover p {opacity:1} |
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
<!-- content to be placed inside <body>…</body> --> | |
<a class="honey"> | |
<p>This is love</p> | |
<div class="left"></div> | |
<div class="right"></div> | |
</a> | |
<div class="honey"> | |
<div class="left"></div> | |
<div class="right"></div> | |
</div> | |
<div class="honey"> | |
<div class="left"></div> | |
<div class="right"></div> | |
</div> | |
<div class="honey clear"> | |
<div class="left"></div> | |
<div class="right"></div> | |
</div> | |
<div class="honey"> | |
<div class="left"></div> | |
<div class="right"></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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment