Skip to content

Instantly share code, notes, and snippets.

@magnificode
Created December 6, 2012 05:02
Show Gist options
  • Select an option

  • Save magnificode/4221924 to your computer and use it in GitHub Desktop.

Select an option

Save magnificode/4221924 to your computer and use it in GitHub Desktop.
A CodePen by dominicmagnifico. Just Some Circles - They move and stuff.
<body>
<div class="description">
<div id="fig1" class="fig fig1">
<h1>Big</h1>
</div>
<div id="fig2" class="fig fig2">
<h1>Bigish</h1>
</div>
<div id="fig3" class="fig fig3">
<h1>Biggah!</h1>
</div>
</div> <!-- //description -->
<div class="graph-image">
<div class="lrgcircle">
<div class="medcircle">
<div class="smallcircle"></div>
</div>
</div>
</div>
</body>
$(window).load(function(){
$('#fig1').hover(function(){
$('.smallcircle').toggleClass('moar');
});
$('#fig2').hover(function(){
$('.medcircle').toggleClass('moar');
});
$('#fig3').hover(function(){
$('.lrgcircle').toggleClass('moar');
});
});
@import "compass";
h1 {
font-family:Helvetica;
}
body {
background:url(http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/creampaper.png) repeat;
}
.graph-image {
display:block;
margin:0px auto 0 auto;
width:200px;
.lrgcircle {
@include transition(.5s);
@include border-radius(200px);
background:#54b444;
position:absolute;
width:200px;height:200px;
z-index:1;
.medcircle {
@extend .lrgcircle;
background:#2b2b2b;
left:13%; top:13%;
width:150px;height:150px;
.smallcircle {
@include transition(.5);
@extend .lrgcircle;
background:#f3f3f3;
left:17%;top:17%;
width:100px;height:100px;
}
}
}
}
.description {
margin:0 auto;
width:100%;
text-align:center;
}
.fig {
cursor: pointer;
display:inline-block;
margin:0 auto;
}
.moar {
@include transition(.5s);
@include scale(1.2);
z-index:999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment