Created
May 28, 2013 18:36
-
-
Save revnode/5665022 to your computer and use it in GitHub Desktop.
Kwicks in CSS
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
<ul id="kwicks"> | |
<li><a class="john" href="http://en.wikipedia.org/wiki/John_lennon" title="John Lennon">John Lennon</a></li> | |
<li><a class="paul" href="http://en.wikipedia.org/wiki/Paul_mccartney" title="Paul McCartney">Paul McCartney</a></li> | |
<li><a class="george" href="http://en.wikipedia.org/wiki/George_harrison" title="George Harrison">George Harrison</a></li> | |
<li><a class="ringo" href="http://en.wikipedia.org/wiki/Ringo_starr" title="Ringo Starr">Ringo Starr</a></li> | |
</ul> | |
<style> | |
/* structure */ | |
#kwicks { width: 590px; overflow-x: hidden; } | |
#kwicks:hover li a { width: 100px; } | |
#kwicks li { | |
float: left; | |
overflow-x: hidden; | |
display: block; | |
} | |
#kwicks li:hover a { width: 285px !important; } | |
/* individual kwicks */ | |
#kwicks li a { | |
display: block; | |
text-indent: -9999px; | |
width: 134px; | |
height: 143px; | |
transition-property: width; | |
transition-duration: 1s; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment