A Pen by Captain Anonymous on CodePen.
-
-
Save jameswquinn/b5333bc39aff7532fb3f1b896268a9c7 to your computer and use it in GitHub Desktop.
tngHy
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 class="my-container"> | |
<div class="my-element"></div> | |
<div class="my-element"></div> | |
<div class="my-element"></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
@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