Created
July 30, 2013 13:29
-
-
Save julienborrel/6112903 to your computer and use it in GitHub Desktop.
Hover on flag test
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
/** | |
* Hover on flag test | |
*/ | |
.flag { | |
margin: 50px; | |
} | |
.flag > div { | |
width: 0; | |
height: 0; | |
float: left; | |
border-width: 100px 33px; | |
border-style: solid; | |
transform: skewY(25deg); | |
transition: all 0.2s ease; | |
} | |
.flag > div:nth-child(even) { | |
transform: skewY(-25deg); | |
} | |
.flag:hover > div { | |
border-width: 100px 50px; | |
border-style: solid; | |
transform: skewY(0); | |
} | |
.blue{ | |
border-color: dodgerblue dodgerblue deepskyblue deepskyblue; | |
} | |
.flag:hover .blue{ | |
border-color: deepskyblue; | |
} | |
.white{ | |
border-color: lightgrey lightgrey white white; | |
} | |
.flag:hover .white{ | |
border-color: white; | |
} | |
.red{ | |
border-color: crimson crimson orangered orangered; | |
} | |
.flag:hover .red{ | |
border-color: orangered; | |
} |
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> --> | |
<div class="flag"> | |
<div class="blue"></div> | |
<div class="white"></div> | |
<div class="red"></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","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