Skip to content

Instantly share code, notes, and snippets.

@jameswquinn
Forked from anonymous/index.html
Created February 2, 2017 21:45
Show Gist options
  • Save jameswquinn/b5333bc39aff7532fb3f1b896268a9c7 to your computer and use it in GitHub Desktop.
Save jameswquinn/b5333bc39aff7532fb3f1b896268a9c7 to your computer and use it in GitHub Desktop.
tngHy
<div class="my-container">
<div class="my-element"></div>
<div class="my-element"></div>
<div class="my-element"></div>
</div>
@import "compass/css3";
.my-element {
@include transition(opacity 0.3s);
@include opacity(0);
@include inline-block;
margin: 5px;
width: 100px;
height: 100px;
background: tomato;
// Loop through the items and add some delay.
@for $i from 1 through 3 {
&:nth-child(#{$i}) {
@include transition-delay(0.1s * $i);
}
}
.my-container:hover & {
@include opacity(1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment