Created
June 8, 2012 19:44
-
-
Save zincplusplus/2897775 to your computer and use it in GitHub Desktop.
:target - flags
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
/** | |
* :target - flags | |
*/ | |
#red:target .flag { | |
display: none; | |
} | |
#red:target li.red { | |
display: block; | |
} | |
#red:target a.red { | |
background-color: #eee; | |
} | |
#white:target .flag { | |
display: none; | |
} | |
#white:target li.white { | |
display: block; | |
} | |
#white:target a.white { | |
background-color: #eee; | |
} | |
#blue:target .flag { | |
display: none; | |
} | |
#blue:target li.blue { | |
display: block; | |
} | |
#blue:target a.blue { | |
background-color: #eee; | |
} | |
body { | |
font-family: Helvetica, Arial, sans; | |
} | |
a { | |
color: #09C; | |
padding: 5px 9px; | |
} | |
ul { | |
list-style: none inside; | |
margin: 0; | |
padding: 0; | |
} | |
.flag { | |
display: block; | |
float: left; | |
padding: 8px; | |
} | |
h1 { | |
padding-left: 8px | |
} |
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 id="red"> | |
<div id="white"> | |
<div id="blue"> | |
<h1>Flags</h1> | |
<p> | |
<a class="red" href="#red">Red</a> | |
<a class="white" href="#white">White</a> | |
<a class="blue" href="#blue">Blue</a> | |
<a href="#">All flags</a> | |
</p> | |
<ul class="flags"> | |
<li class="flag red white"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/Denmark.png" height="48" width="48" /></li> | |
<li class="flag white yellow blue green"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/Solomon%20Islands.png" height="48" width="48" /></li> | |
<li class="flag red white blue"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/United%20Kingdom(Great%20Britain).png" height="48" width="48" /></li> | |
<li class="flag yellow"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/Viet%20Nam.png" height="48" width="48" /></li> | |
<li class="flag yellow blue"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/Sweden.png" height="48" width="48" /></li> | |
<li class="flag red green yellow black"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/Sao%20Tome%20&%20Principe.png" height="48" width="48" /></li> | |
<li class="flag white blue"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/Greece.png" height="48" width="48" /></li> | |
<li class="flag red white blue yellow black"><img src="http://cdn1.iconfinder.com/data/icons/flags/flags/48/South%20Africa.png" height="48" width="48" /></li> | |
</ul> | |
</div> | |
</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
{"view":"separate","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