Skip to content

Instantly share code, notes, and snippets.

@bshyong
Created July 3, 2013 03:08
Show Gist options
  • Save bshyong/5915142 to your computer and use it in GitHub Desktop.
Save bshyong/5915142 to your computer and use it in GitHub Desktop.
A CodePen by Andreas Gillström. Telecast Hover - Idea from http://drbl.in/hDjU
<h4>TELECAST HOVER</h4>
<div class="kontainer">
<div class="a"></div>
<div class="b"></div>
<div class="c"></div>
<div class="d"></div>
<div class="e"></div>
<div class="f"></div>
</div>
<p>Idea from <a href="http://drbl.in/hDjU">http://drbl.in/hDjU</a></p>
@import url(http://fonts.googleapis.com/css?family=Open+Sans);
*{
margin: 0;
padding: 0;
font-family: Open sans;
-webkit-font-smoothing: subpixel-antialiased;
color: #007bb7;
text-decoration: none;
/*-webkit-backface-visibility: hidden;*/
}
body{
background: #fbfbfb;
}
h4{
font-size: 2em;
text-align: center;
margin-top: 30px;
text-shadow: -2px 2px 0px rgba(0,0,0,0.1);
}
p {
font-size: 0.8em;
position: fixed;
bottom: 80px;
left: 60px;
text-align: center;
}
.kontainer {
margin: 50px auto;
width: 300px;
border: 0px solid #fbfbfb;
}
.kontainer:before {
content: '';
background: #fbfbfb;
height: 20px;
width: 80px;
position: absolute;
z-index: 200;
margin: 20px 0 0 110px;
}
.kontainer:after {
content: '';
background: #fbfbfb;
height: 60px;
width: 20px;
position: absolute;
z-index: 202;
margin: -80px 0 0 140px;
}
.a, .b, .c, .d, .e, .f {
position: relative;
background: #fcbd10;
height: 20px;
width: 84px;
box-shadow: -3px 4px 0px 0px rgba(0,0,0,0.1);
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
.a {
border-radius: 15px 0 0 0;
}
.b{
background: #f17722;
width: 66px;
}
.c {
background: #d71c23;
width: 76px;
}
.d {
background: #7f2980;
width: 60px;
}
.e {
background: #007bb7;
width: 90px;
}
.f {
background: #3cabe0;
width: 80px;
border-radius: 0 0 0 15px;
}
.kontainer:hover > .a,
.kontainer:hover > .b,
.kontainer:hover > .c,
.kontainer:hover > .d,
.kontainer:hover > .e,
.kontainer:hover > .f{
width: 300px;
}
.kontainer:hover > .a{
border-radius: 15px 15px 0 0;
}
.kontainer:hover > .f{
border-radius: 0 0 15px 15px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment